mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
refactor: extract application construction and lifecycle
This commit is contained in:
1 parent
092f28e301
commit
4d37760314
36 files changed
+1363
-382
No files matched your search
@@ -643,5 +643,13 @@ export function initFirstRunExperience({
|
||||
}
|
||||
syncToExclusiveSurfaces();
|
||||
|
||||
return { dismiss, isTopmost };
|
||||
// Teardown is not a user dismissal and must not change the show preference.
|
||||
const destroy = () => {
|
||||
closing = true;
|
||||
documentRef.removeEventListener('keydown', onKeyDown, true);
|
||||
globalThis.removeEventListener?.('resize', onViewportResize);
|
||||
surfaceObserver?.disconnect();
|
||||
root.remove();
|
||||
};
|
||||
return { dismiss, isTopmost, destroy };
|
||||
}
|
||||
Reference in new issue
Block a user