anytype: Disable auto checking for updates and updating manually

This commit is contained in:
David Chocholatý
2025-04-25 13:27:25 +02:00
parent 07ee7aabd7
commit 387f7ec950
2 changed files with 41 additions and 0 deletions
@@ -0,0 +1,37 @@
From d236396b1da80a7233168e01e8164256e7f69cc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Chocholat=C3=BD?= <chocholaty.david@protonmail.com>
Date: Fri, 25 Apr 2025 12:29:37 +0200
Subject: [PATCH] feat(update): Disable auto checking for updates and updating
manually
---
electron/js/update.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/electron/js/update.js b/electron/js/update.js
index 0e34efa..9386c90 100644
--- a/electron/js/update.js
+++ b/electron/js/update.js
@@ -29,7 +29,8 @@ class UpdateManager {
autoUpdater.autoInstallOnAppQuit = false;
autoUpdater.channel = channel;
- this.setTimeout();
+ // PATCH(update): Never check for updates on a timer timeout.
+ // this.setTimeout();
autoUpdater.on('checking-for-update', () => {
Util.log('info', 'Checking for update');
@@ -93,6 +94,9 @@ class UpdateManager {
};
isAllowed () {
+ // PATCH(update): Always disallow update check, even when requested by the user manually or when Anytype starts.
+ return false;
+
const { config } = ConfigManager;
if (config.updateDisabled) {
--
2.49.0
+4
View File
@@ -52,6 +52,10 @@ buildNpmPackage {
"--nodedir=${electron.headers}"
];
patches = [
./0001-feat-update-Disable-auto-checking-for-updates-and-updating-manually.patch
];
buildPhase = ''
runHook preBuild