add logs for context changes
This commit is contained in:
Vendored
+2
-1
@@ -2266,6 +2266,7 @@
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
this.closeContext = (contextId) => {
|
this.closeContext = (contextId) => {
|
||||||
|
console.log("closing context", contextId);
|
||||||
if (!this.contexts.map((context) => context.contextId).includes(contextId))
|
if (!this.contexts.map((context) => context.contextId).includes(contextId))
|
||||||
return;
|
return;
|
||||||
while (this.contexts.length > 0) {
|
while (this.contexts.length > 0) {
|
||||||
@@ -2302,6 +2303,7 @@
|
|||||||
return this.contexts.pop();
|
return this.contexts.pop();
|
||||||
}
|
}
|
||||||
set context(context) {
|
set context(context) {
|
||||||
|
console.log("setting context", context.contextId, this.contextStack.has(context.contextId));
|
||||||
if (this.contextStack.has(context.contextId)) return;
|
if (this.contextStack.has(context.contextId)) return;
|
||||||
this.contextStack.set(context.contextId, context);
|
this.contextStack.set(context.contextId, context);
|
||||||
this.logContexts();
|
this.logContexts();
|
||||||
@@ -2354,7 +2356,6 @@
|
|||||||
if (selectedContext != this.currentContext.value) {
|
if (selectedContext != this.currentContext.value) {
|
||||||
this.closeContext();
|
this.closeContext();
|
||||||
}
|
}
|
||||||
this.coreViewModel.logContexts();
|
|
||||||
this.coreViewModel.context = selectedContext;
|
this.coreViewModel.context = selectedContext;
|
||||||
this.currentContext.value = selectedContext;
|
this.currentContext.value = selectedContext;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import FileTransferModel from "../../Model/Global/fileTransferModel";
|
|||||||
import { v4 } from "uuid";
|
import { v4 } from "uuid";
|
||||||
|
|
||||||
export default class CoreViewModel {
|
export default class CoreViewModel {
|
||||||
readonly BUILD = "Build 26.04.13.B";
|
readonly BUILD = "Build 26.04.13.C";
|
||||||
|
|
||||||
translations: Translations;
|
translations: Translations;
|
||||||
|
|
||||||
@@ -29,11 +29,13 @@ export default class CoreViewModel {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
set context(context: Context) {
|
set context(context: Context) {
|
||||||
|
console.log("setting context", context.contextId, this.contextStack.has(context.contextId));
|
||||||
if (this.contextStack.has(context.contextId)) return;
|
if (this.contextStack.has(context.contextId)) return;
|
||||||
this.contextStack.set(context.contextId, context);
|
this.contextStack.set(context.contextId, context);
|
||||||
this.logContexts();
|
this.logContexts();
|
||||||
}
|
}
|
||||||
closeContext = (contextId: string): void => {
|
closeContext = (contextId: string): void => {
|
||||||
|
console.log("closing context", contextId);
|
||||||
if (
|
if (
|
||||||
!this.contexts
|
!this.contexts
|
||||||
.map((context) => context.contextId)
|
.map((context) => context.contextId)
|
||||||
@@ -148,8 +150,6 @@ export class ContextHost<T> extends Context {
|
|||||||
this.closeContext();
|
this.closeContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.coreViewModel.logContexts();
|
|
||||||
|
|
||||||
this.coreViewModel.context = selectedContext;
|
this.coreViewModel.context = selectedContext;
|
||||||
this.currentContext.value = selectedContext;
|
this.currentContext.value = selectedContext;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user