From cb5b1f24e3ad0832d8b432d6f8da1b552e8f551b Mon Sep 17 00:00:00 2001 From: Lemmy Date: Tue, 16 Dec 2025 08:59:07 -0500 Subject: [PATCH] Startup: improved lagg on startup with a large number of fonts. --- Modules/Panels/Settings/SettingsContent.qml | 5 ++--- Services/System/FontService.qml | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Modules/Panels/Settings/SettingsContent.qml b/Modules/Panels/Settings/SettingsContent.qml index 34a31d234..8d98d7ed5 100644 --- a/Modules/Panels/Settings/SettingsContent.qml +++ b/Modules/Panels/Settings/SettingsContent.qml @@ -31,7 +31,6 @@ Item { } Component.onCompleted: { - updateTabsModel(); // Restore sidebar state sidebarExpanded = ShellState.getSettingsSidebarExpanded(); } @@ -591,13 +590,13 @@ Item { spacing: Style.marginS NIcon { - icon: root.tabsModel[currentTabIndex]?.icon + icon: root.tabsModel[currentTabIndex]?.icon ?? "" color: Color.mPrimary pointSize: Style.fontSizeXXL } NText { - text: I18n.tr(root.tabsModel[currentTabIndex]?.label) || "" + text: root.tabsModel[root.currentTabIndex]?.label ? I18n.tr(root.tabsModel[root.currentTabIndex].label) : "" pointSize: Style.fontSizeXL font.weight: Style.fontWeightBold color: Color.mPrimary diff --git a/Services/System/FontService.qml b/Services/System/FontService.qml index 61a30fe42..0161fe84e 100644 --- a/Services/System/FontService.qml +++ b/Services/System/FontService.qml @@ -14,11 +14,9 @@ Singleton { property bool fontsLoaded: false property bool isLoading: false - // ------------------------------------------- - // Auto-initialize when component is loaded - Component.onCompleted: init() - function init() { + if (fontsLoaded || isLoading) + return; Logger.i("Font", "Service started"); loadFontsViaFcList(); }