Unverified Commit 3ea5b529 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

[Backport release-25.05] anytype: fix single instance detection and specify...

[Backport release-25.05] anytype: fix single instance detection and specify URL in .desktop file (#410020)
parents 5518e878 95ee32e5
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
From 0622b4b5497d8bd923eb0d6dd3f917dfcbda9d53 Mon Sep 17 00:00:00 2001
From: Axel Karjalainen <axel@axka.fi>
Date: Thu, 22 May 2025 22:38:14 +0300
Subject: [PATCH] fix: single instance detection when not packaged

---
 electron.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/electron.js b/electron.js
index d70f20f..158bb93 100644
--- a/electron.js
+++ b/electron.js
@@ -76,7 +76,7 @@ if (is.development && !port) {
 	return;
 };
 
-if (app.isPackaged && !app.requestSingleInstanceLock()) {
+if (!is.development && !app.requestSingleInstanceLock()) {
 	Api.exit(mainWindow, '' ,false);
 	return;
 };
-- 
2.49.0
+2 −1
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ buildNpmPackage {

  patches = [
    ./0001-feat-update-Disable-auto-checking-for-updates-and-updating-manually.patch
    ./0001-fix-single-instance-detection-when-not-packaged.patch
  ];

  buildPhase = ''
@@ -101,7 +102,7 @@ buildNpmPackage {
  desktopItems = [
    (makeDesktopItem {
      name = "anytype";
      exec = "anytype";
      exec = "anytype %U";
      icon = "anytype";
      desktopName = "Anytype";
      comment = description;