mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 14:05:31 +02:00
Refactor ZenGlanceManager.mjs to simplify closing of glance by removing unnecessary animation option and handle quitting application when closing glance
This commit is contained in:
parent
6d542ea79b
commit
9b4b399c59
1 changed files with 4 additions and 3 deletions
|
@ -173,6 +173,7 @@
|
||||||
this.lastCurrentTab = this.#currentTab;
|
this.lastCurrentTab = this.#currentTab;
|
||||||
|
|
||||||
this.overlay.classList.remove("zen-glance-overlay");
|
this.overlay.classList.remove("zen-glance-overlay");
|
||||||
|
gBrowser._getSwitcher().setTabStateNoAction(this.lastCurrentTab, gBrowser.AsyncTabSwitcher.STATE_UNLOADED);
|
||||||
|
|
||||||
if (!onTabClose && gBrowser.selectedTab === this.lastCurrentTab) {
|
if (!onTabClose && gBrowser.selectedTab === this.lastCurrentTab) {
|
||||||
this._duringOpening = true;
|
this._duringOpening = true;
|
||||||
|
@ -187,9 +188,9 @@
|
||||||
|
|
||||||
this.lastCurrentTab.removeAttribute("zen-glance-tab");
|
this.lastCurrentTab.removeAttribute("zen-glance-tab");
|
||||||
|
|
||||||
this.#currentTab.remove();
|
gBrowser.tabContainer._invalidateCachedTabs();
|
||||||
this.#currentBrowser.destroy();
|
gBrowser.removeTab(this.lastCurrentTab, { animate: false });
|
||||||
this.#currentBrowser.closest(".browserSidebarContainer").remove();
|
|
||||||
this.#currentTab = null;
|
this.#currentTab = null;
|
||||||
this.#currentBrowser = null;
|
this.#currentBrowser = null;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue