fix: don't flash compact sidebar when opening glance

Flashing the sidebar when opening glance is unnecessary, as the user explicitly opens the glance tab so there are no new information presented to the user in the sidebar.

On the other hand, the sidebar partially covers the glance tab, meaning that the user has to wait for a while before seeing the tab content, which breaks the flow.

Closes #3351

Signed-off-by: Pavel Zolotarevskiy <code@fxgn.dev>
This commit is contained in:
Pavel Zolotarevskiy
2025-01-03 21:15:31 +03:00
committed by GitHub
parent abdbec2523
commit 9bf6b6ec4a

View File

@@ -76,7 +76,8 @@ index f7c39fe804182e2bdf53045ba3b6a5ba17079fc3..93be23da305a5e2e51bff1c5b5f28743
- } - }
+ this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant); + this.arrowScrollbox.ensureElementIsVisible(selectedTab, aInstant);
+ if (!aInstant && Services.prefs.getBoolPref('zen.view.compact') + if (!aInstant && !gZenGlanceManager.animatingOpen
+ && Services.prefs.getBoolPref('zen.view.compact')
+ && Services.prefs.getBoolPref('zen.view.compact.toolbar-flash-popup')) { + && Services.prefs.getBoolPref('zen.view.compact.toolbar-flash-popup')) {
+ gZenCompactModeManager.flashSidebar(); + gZenCompactModeManager.flashSidebar();
+ } + }