mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
fix: stop Cockpit work before asynchronous UI teardown
This commit is contained in:
1 parent
947fc79182
commit
152d3e2352
11 files changed
+150
-15
No files matched your search
@@ -63,6 +63,7 @@ export class CockpitViewController {
|
||||
this.viewer = viewer;
|
||||
this.services = services;
|
||||
this.destroyed = false;
|
||||
this.disposed = false;
|
||||
this.active = false;
|
||||
this.trackedEntity = null;
|
||||
this.trackedEntityWasShown = true;
|
||||
@@ -407,10 +408,10 @@ export class CockpitViewController {
|
||||
return handleSignalClick.call(this, event);
|
||||
}
|
||||
|
||||
dispose() {
|
||||
/** Revoke new work before the shell awaits layer restoration. */
|
||||
stop() {
|
||||
if (this.destroyed) return;
|
||||
this.destroyed = true;
|
||||
this.exit({ restoreTracking: false });
|
||||
this.regionalBriefAbort?.abort();
|
||||
this.regionalBriefAbort = null;
|
||||
this.regionalBriefRequestToken += 1;
|
||||
@@ -421,4 +422,11 @@ export class CockpitViewController {
|
||||
for (const removeListener of this._listenerRemovers.splice(0))
|
||||
removeListener?.();
|
||||
}
|
||||
|
||||
dispose() {
|
||||
if (this.disposed) return;
|
||||
this.disposed = true;
|
||||
this.stop();
|
||||
this.exit({ restoreTracking: false });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user