remove clearmodals mothed as it's no longer needed

This commit is contained in:
Red Adaya 2024-03-12 09:03:46 +08:00
parent 5258a67a78
commit f850e3b728

View File

@ -337,7 +337,6 @@ class Model {
cancelAlert(): void {
mobx.action(() => {
this.alertMessage.set(null);
this.modalsModel.popModal();
})();
if (this.alertPromiseResolver != null) {
this.alertPromiseResolver(false);
@ -484,15 +483,13 @@ class Model {
this.historyViewModel.handleDocKeyDown(e);
return;
}
if (checkKeyPressed(waveEvent, "Escape")) {
e.preventDefault();
if (this.activeMainView.get() == "webshare") {
this.showSessionView();
return;
}
if (this.clearModals()) {
return;
}
const inputModel = this.inputModel;
inputModel.toggleInfoMsg();
if (inputModel.inputMode.get() != null) {
@ -615,33 +612,6 @@ class Model {
return screen.getTermWrap(line.lineid);
}
clearModals(): boolean {
let didSomething = false;
mobx.action(() => {
if (this.screenSettingsModal.get()) {
this.screenSettingsModal.set(null);
didSomething = true;
}
if (this.sessionSettingsModal.get()) {
this.sessionSettingsModal.set(null);
didSomething = true;
}
if (this.screenSettingsModal.get()) {
this.screenSettingsModal.set(null);
didSomething = true;
}
if (this.clientSettingsModal.get()) {
this.clientSettingsModal.set(false);
didSomething = true;
}
if (this.lineSettingsModal.get()) {
this.lineSettingsModal.set(null);
didSomething = true;
}
})();
return didSomething;
}
restartWaveSrv(): void {
getApi().restartWaveSrv();
}