From b68d5c9f4c84f4aa5d36d5f0d266f3bc2b225437 Mon Sep 17 00:00:00 2001 From: quadbyte Date: Tue, 12 Aug 2025 14:29:58 -0400 Subject: [PATCH] GitHub removed some unecessary code --- Modules/Settings/Tabs/About.qml | 5 ----- Services/GitHub.qml | 8 -------- shell.qml | 3 ++- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Modules/Settings/Tabs/About.qml b/Modules/Settings/Tabs/About.qml index 883effc..574f219 100644 --- a/Modules/Settings/Tabs/About.qml +++ b/Modules/Settings/Tabs/About.qml @@ -14,11 +14,6 @@ ColumnLayout { property string currentVersion: "v1.2.1" // Fallback version property var contributors: GitHub.contributors - Component.onCompleted: { - // Initialize the GitHub service - GitHub.init() - } - spacing: 0 Layout.fillWidth: true Layout.fillHeight: true diff --git a/Services/GitHub.qml b/Services/GitHub.qml index 5a6ff34..8932d03 100644 --- a/Services/GitHub.qml +++ b/Services/GitHub.qml @@ -31,9 +31,6 @@ Singleton { } onLoadFailed: function (error) { if (error.toString().includes("No such file") || error === 2) { - // File doesn't exist, create it with default values - console.log("[GitHub] Creating new cache file") - writeAdapter() // Fetch data after a short delay to ensure file is created Qt.callLater(() => { fetchFromGitHub() @@ -50,11 +47,6 @@ Singleton { } } - // -------------------------------- - function init() {// does nothing but ensure the singleton is created - // do not remove - } - // -------------------------------- function loadFromCache() { const now = Time.timestamp diff --git a/shell.qml b/shell.qml index 1f7e057..4248b32 100644 --- a/shell.qml +++ b/shell.qml @@ -39,7 +39,8 @@ ShellRoot { } Component.onCompleted: { - // On startup, check if we need to get fresh weather data + // Ensure our singleton is created as soon as possible + // so we start fetching weather asap if necessary Location.init() } }