Startup: improved lagg on startup with a large number of fonts.

This commit is contained in:
Lemmy
2025-12-16 08:59:07 -05:00
parent 4ab86449c8
commit cb5b1f24e3
2 changed files with 4 additions and 7 deletions
+2 -3
View File
@@ -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
+2 -4
View File
@@ -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();
}