mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
anytype: migrate patches to ts
This commit is contained in:
parent
c31369cc6e
commit
ad9b652ab4
3 changed files with 26 additions and 40 deletions
|
|
@ -1,18 +1,8 @@
|
|||
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 {
|
||||
diff --git a/electron/ts/update.ts b/electron/ts/update.ts
|
||||
index 8d63cb8eb7..ea2dadf0c9 100644
|
||||
--- a/electron/ts/update.ts
|
||||
+++ b/electron/ts/update.ts
|
||||
@@ -31,7 +31,8 @@ class UpdateManager {
|
||||
autoUpdater.autoInstallOnAppQuit = false;
|
||||
autoUpdater.channel = channel;
|
||||
|
||||
|
|
@ -22,16 +12,13 @@ index 0e34efa..9386c90 100644
|
|||
|
||||
autoUpdater.on('checking-for-update', () => {
|
||||
Util.log('info', 'Checking for update');
|
||||
@@ -93,6 +94,9 @@ class UpdateManager {
|
||||
@@ -79,6 +80,9 @@ class UpdateManager {
|
||||
};
|
||||
|
||||
isAllowed () {
|
||||
isAllowed (): boolean {
|
||||
+ // 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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
diff --git a/electron.js b/electron.js
|
||||
index c5d6760882..17afc05e26 100644
|
||||
--- a/electron.js
|
||||
+++ b/electron.js
|
||||
@@ -15,7 +15,6 @@ const store = new Store({ name: [ 'localStorage', suffix ].join('-') });
|
||||
|
||||
// gRPC DevTools extension ID
|
||||
const GRPC_DEVTOOLS_ID = 'fohdnlaeecihjiendkfhifhlgldpeopm';
|
||||
-const { installExtension } = require('@tomjs/electron-devtools-installer');
|
||||
|
||||
// Fix notifications app name
|
||||
if (is.windows) {
|
||||
diff --git a/electron/ts/main.ts b/electron/ts/main.ts
|
||||
index 373518ee2d..8eefcd58be 100644
|
||||
--- a/electron/ts/main.ts
|
||||
+++ b/electron/ts/main.ts
|
||||
@@ -15,7 +15,6 @@ import storage from 'electron-json-storage';
|
||||
import * as remote from '@electron/remote/main';
|
||||
import { installNativeMessagingHost } from './lib/installNativeMessagingHost';
|
||||
import { getSafeStorage } from './safeStorage';
|
||||
-import { installExtension } from '@tomjs/electron-devtools-installer';
|
||||
import Api from './api';
|
||||
import ConfigManager from './config';
|
||||
import UpdateManager from './update';
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
diff --git a/electron/js/util.js b/electron/js/util.js
|
||||
index da18f41ad0..bb07ec9f21 100644
|
||||
--- a/electron/js/util.js
|
||||
+++ b/electron/js/util.js
|
||||
@@ -314,7 +314,9 @@ class Util {
|
||||
if (!is.linux) {
|
||||
diff --git a/electron/ts/util.ts b/electron/ts/util.ts
|
||||
index 1c5d6fd4b4..8c7811b58e 100644
|
||||
--- a/electron/ts/util.ts
|
||||
+++ b/electron/ts/util.ts
|
||||
@@ -318,6 +318,9 @@ class Util {
|
||||
return;
|
||||
};
|
||||
-
|
||||
+ // NixOS: desktop entries are managed by the package, avoid
|
||||
|
||||
+ // NixOS: desktop entries are managed by the package, avoid
|
||||
+ // writing user-local anytype.desktop which goes stale on updates
|
||||
+ return;
|
||||
const { execFile } = require('child_process');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue