improve UI
This commit is contained in:
@@ -52,12 +52,23 @@ export default class CoreViewModel {
|
||||
)
|
||||
return;
|
||||
|
||||
let exitNext: boolean = false;
|
||||
|
||||
while (this.contexts.length > 0) {
|
||||
const currentContext: Context | undefined = this.context;
|
||||
if (!currentContext) return;
|
||||
currentContext.handleContextClose(fromHistoryEvent);
|
||||
const response = currentContext.handleContextClose(fromHistoryEvent);
|
||||
if (response == false) return;
|
||||
this.contextStack.delete(currentContext.contextId);
|
||||
if (currentContext.contextId == contextId) break;
|
||||
if (response == true) {
|
||||
exitNext = true;
|
||||
continue;
|
||||
} else if (exitNext == true) {
|
||||
break
|
||||
}
|
||||
else if (currentContext.contextId == contextId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -196,7 +207,7 @@ export class Context {
|
||||
};
|
||||
|
||||
close = (): void => {};
|
||||
handleContextClose = (fromHistoryEvent: boolean): void => {};
|
||||
handleContextClose = (fromHistoryEvent: boolean): void|boolean=> {};
|
||||
|
||||
registerKeyStroke = (key: string, fn: () => void): void => {
|
||||
this.keystrokes.set(key, fn);
|
||||
|
||||
Reference in New Issue
Block a user