浏览代码

Add settings conditionn

Ruben 3 月之前
父节点
当前提交
03d98a7364
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/PicView.Avalonia/StartUp/StartUpHelper.cs

+ 1 - 1
src/PicView.Avalonia/StartUp/StartUpHelper.cs

@@ -165,7 +165,7 @@ public static class StartUpHelper
 
         if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
         {
-            if (!ProcessHelper.CheckIfAnotherInstanceIsRunning())
+            if (Settings.UIProperties.OpenInSameWindow && !ProcessHelper.CheckIfAnotherInstanceIsRunning())
             {
                 // No other instance is running, create named pipe server
                 _ = IPC.StartListeningForArguments(vm);