fix context bug
This commit is contained in:
Vendored
+10
-3
@@ -1438,9 +1438,9 @@
|
|||||||
let exitNext = false;
|
let exitNext = false;
|
||||||
while (this.contexts.length > 0) {
|
while (this.contexts.length > 0) {
|
||||||
const currentContext = this.context;
|
const currentContext = this.context;
|
||||||
if (!currentContext) return;
|
if (!currentContext) break;
|
||||||
const response = currentContext.handleContextClose(fromHistoryEvent);
|
const response = currentContext.handleContextClose(fromHistoryEvent);
|
||||||
if (response == false) return;
|
if (response == false) break;
|
||||||
this.contextStack.delete(currentContext.contextId);
|
this.contextStack.delete(currentContext.contextId);
|
||||||
if (response == true) {
|
if (response == true) {
|
||||||
exitNext = true;
|
exitNext = true;
|
||||||
@@ -4629,6 +4629,11 @@
|
|||||||
this.secondaryChannels.add(secondaryChannel);
|
this.secondaryChannels.add(secondaryChannel);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// context
|
||||||
|
this.handleContextClose = (fromHistoryEvent) => {
|
||||||
|
if (!fromHistoryEvent) return;
|
||||||
|
return true;
|
||||||
|
};
|
||||||
this.preloadData();
|
this.preloadData();
|
||||||
this.cannotSetEncryptionKey = createProxyState(
|
this.cannotSetEncryptionKey = createProxyState(
|
||||||
[this.encryptionKeyInput],
|
[this.encryptionKeyInput],
|
||||||
@@ -4961,9 +4966,11 @@
|
|||||||
};
|
};
|
||||||
// context
|
// context
|
||||||
this.handleContextClose = (fromHistoryEvent) => {
|
this.handleContextClose = (fromHistoryEvent) => {
|
||||||
if (this.replyViewSelectedMessage.value == void 0 && fromHistoryEvent) return true;
|
if (fromHistoryEvent) {
|
||||||
|
if (this.replyViewSelectedMessage.value == void 0) return true;
|
||||||
this.resetReplyView();
|
this.resetReplyView();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.restoreFilter();
|
this.restoreFilter();
|
||||||
this.cannotSendMessage = createProxyState(
|
this.cannotSendMessage = createProxyState(
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
const VERSION = "2610 Beta 21.9"
|
const VERSION = "2610 Beta 21.11"
|
||||||
|
|
||||||
function processUrl(event) {
|
function processUrl(event) {
|
||||||
const url = event.request.url;
|
const url = event.request.url;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
2610 Beta 21.9
|
2610 Beta 21.11
|
||||||
|
|||||||
@@ -56,17 +56,16 @@ export default class CoreViewModel {
|
|||||||
|
|
||||||
while (this.contexts.length > 0) {
|
while (this.contexts.length > 0) {
|
||||||
const currentContext: Context | undefined = this.context;
|
const currentContext: Context | undefined = this.context;
|
||||||
if (!currentContext) return;
|
if (!currentContext) break;
|
||||||
const response = currentContext.handleContextClose(fromHistoryEvent);
|
const response = currentContext.handleContextClose(fromHistoryEvent);
|
||||||
if (response == false) return;
|
if (response == false) break;
|
||||||
this.contextStack.delete(currentContext.contextId);
|
this.contextStack.delete(currentContext.contextId);
|
||||||
if (response == true) {
|
if (response == true) {
|
||||||
exitNext = true;
|
exitNext = true;
|
||||||
continue;
|
continue;
|
||||||
} else if (exitNext == true) {
|
} else if (exitNext == true) {
|
||||||
break
|
break
|
||||||
}
|
} else if (currentContext.contextId == contextId) {
|
||||||
else if (currentContext.contextId == contextId) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,10 +198,13 @@ export default class MessagePageViewModel extends Context {
|
|||||||
|
|
||||||
// context
|
// context
|
||||||
handleContextClose = (fromHistoryEvent: boolean):boolean=> {
|
handleContextClose = (fromHistoryEvent: boolean):boolean=> {
|
||||||
if (this.replyViewSelectedMessage.value == undefined && fromHistoryEvent) return true;
|
if (fromHistoryEvent) {
|
||||||
|
if (this.replyViewSelectedMessage.value == undefined) return true;
|
||||||
|
|
||||||
this.resetReplyView();
|
this.resetReplyView();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// init
|
// init
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
@@ -115,6 +115,12 @@ export default class SettingsPageViewModel extends Context {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// context
|
||||||
|
handleContextClose = (fromHistoryEvent: boolean): void | boolean => {
|
||||||
|
if (!fromHistoryEvent) return;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// init
|
// init
|
||||||
constructor(
|
constructor(
|
||||||
public readonly coreViewModel: CoreViewModel,
|
public readonly coreViewModel: CoreViewModel,
|
||||||
|
|||||||
Reference in New Issue
Block a user