GitHub removed some unecessary code

This commit is contained in:
quadbyte 2025-08-12 14:29:58 -04:00
parent e3ff4e5bcf
commit b68d5c9f4c
3 changed files with 2 additions and 14 deletions

View file

@ -14,11 +14,6 @@ ColumnLayout {
property string currentVersion: "v1.2.1" // Fallback version property string currentVersion: "v1.2.1" // Fallback version
property var contributors: GitHub.contributors property var contributors: GitHub.contributors
Component.onCompleted: {
// Initialize the GitHub service
GitHub.init()
}
spacing: 0 spacing: 0
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true

View file

@ -31,9 +31,6 @@ Singleton {
} }
onLoadFailed: function (error) { onLoadFailed: function (error) {
if (error.toString().includes("No such file") || error === 2) { 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 // Fetch data after a short delay to ensure file is created
Qt.callLater(() => { Qt.callLater(() => {
fetchFromGitHub() fetchFromGitHub()
@ -50,11 +47,6 @@ Singleton {
} }
} }
// --------------------------------
function init() {// does nothing but ensure the singleton is created
// do not remove
}
// -------------------------------- // --------------------------------
function loadFromCache() { function loadFromCache() {
const now = Time.timestamp const now = Time.timestamp

View file

@ -39,7 +39,8 @@ ShellRoot {
} }
Component.onCompleted: { 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() Location.init()
} }
} }