comparison src/app/Session.ts @ 468:2fb2357420f9

Hide update history method.
author Lucas Thompson <dev@lucas.im>
date Fri, 30 Jun 2017 15:35:16 +0100
parents b963af7e6eaf
children 5f3e1b275e18
comparison
equal deleted inserted replaced
467:b963af7e6eaf 468:2fb2357420f9
160 } else { 160 } else {
161 this.historyOffset = 0; 161 this.historyOffset = 0;
162 } 162 }
163 } 163 }
164 164
165 updateHistory(): void { 165 toIterable(): Iterable<T> {
166 return this.stack;
167 }
168
169 private updateHistory(): void {
166 if (this.historyOffset !== 0) { 170 if (this.historyOffset !== 0) {
167 this.history = this.history.slice( 171 this.history = this.history.slice(
168 0, 172 0,
169 this.history.length - this.historyOffset 173 this.history.length - this.historyOffset
170 ); 174 );
171 this.historyOffset = 0; 175 this.historyOffset = 0;
172 } 176 }
173 this.history.push([...this.stack]); 177 this.history.push([...this.stack]);
174 } 178 }
175
176 toIterable(): Iterable<T> {
177 return this.stack;
178 }
179 } 179 }