Made the loading of the sidebar hover preference lazy

This commit is contained in:
afonsofrancof
2025-02-18 15:20:51 +00:00
parent 4ce9385fd5
commit 1b8891a59b

View File

@@ -276,7 +276,10 @@ var gZenCompactModeManager = {
},
get hoverableElements() {
const showSidebarOnHover = Services.prefs.getBoolPref('zen.view.compact.show-sidebar-on-hover', true);
if (typeof this._showSidebarOnHover === 'undefined') {
this._showSidebarOnHover = Services.prefs.getBoolPref('zen.view.compact.show-sidebar-on-hover', true);
}
const showSidebarOnHover = this._showSidebarOnHover;
return [
...(showSidebarOnHover
? [