summaryrefslogtreecommitdiff
path: root/pkgs/unofficial-homestuck-collection/0002-disable-update-check.patch
blob: c1b9dde3433d5d139def5a426a0ed466ef2a27ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From 2962679d4a3d8320681fcd6804712a71a9ea661b Mon Sep 17 00:00:00 2001
From: Freya Murphy <freya@freyacat.org>
Date: Sun, 20 Jul 2025 12:06:21 -0400
Subject: [PATCH 2/3] disable update check

---
 src/components/SystemPages/Settings.vue | 15 +++++++++------
 src/components/UIElements/Updater.vue   | 13 +------------
 2 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/src/components/SystemPages/Settings.vue b/src/components/SystemPages/Settings.vue
index 3371358..47c5ea6 100644
--- a/src/components/SystemPages/Settings.vue
+++ b/src/components/SystemPages/Settings.vue
@@ -598,12 +598,15 @@ export default {
           label: "Use system window decorations",
           desc: "Use OS-native window decorations instead of the electron title bar. <strong>Will restart the application.</strong>",
           platform_whitelist: ['electron']
-        }, {
-          model: "allowSysUpdateNotifs",
-          label: "Update notifications",
-          desc: "Unless this setting is disabled, the collection will check to see if there's a new version of the app available when it starts up and alert you if there is.",
-          platform_whitelist: ['electron']
-        }, {
+        }, 
+        // MOD: patch out update notifs
+        // {
+        //   model: "allowSysUpdateNotifs",
+        //   label: "Update notifications",
+        //   desc: "Unless this setting is disabled, the collection will check to see if there's a new version of the app available when it starts up and alert you if there is.",
+        //   platform_whitelist: ['electron']
+        // }, 
+        {
           model: "useTabbedBrowsing",
           label: "Tabbed Browsing",
           desc: "By default, the web app only shows one page at a time, like a standard website. This setting re-enables the in-app tab bar, and the app will store your tabs in settings.",
diff --git a/src/components/UIElements/Updater.vue b/src/components/UIElements/Updater.vue
index 6b3f677..d9bae45 100644
--- a/src/components/UIElements/Updater.vue
+++ b/src/components/UIElements/Updater.vue
@@ -73,18 +73,7 @@ export default {
   watch: {
   },
   mounted(){
-    const is_flatpak = !!(process.env.container)
-    if (this.$localData.settings.allowSysUpdateNotifs && !is_flatpak) {
-      const now = new Date()
-      const last_checked = new Date(this.$localData.settings.lastCheckedUpdate)
-      const one_day = (12 * 60 * 60 * 1000)
-      if (last_checked == "Invalid Date" || now - last_checked > one_day) {
-        this.doUpdateCheck()
-        this.$localData.settings.lastCheckedUpdate = now.toISOString()
-      } else {
-        this.$logger.info("Skipping update check, already checked", last_checked)
-      }
-    }
+    // MOD: patch out update check
   }
 }
 </script>
-- 
2.50.0