From a03f62832ad52362cefc06f23f5130e1d78c82af Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 18 Sep 2025 12:08:49 +0800 Subject: [PATCH] Ignore index change for -1 --- Flow.Launcher/ViewModel/SelectBrowserViewModel.cs | 2 ++ Flow.Launcher/ViewModel/SelectFileManagerViewModel.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Flow.Launcher/ViewModel/SelectBrowserViewModel.cs b/Flow.Launcher/ViewModel/SelectBrowserViewModel.cs index f75a0ef8b..e3a0e4e44 100644 --- a/Flow.Launcher/ViewModel/SelectBrowserViewModel.cs +++ b/Flow.Launcher/ViewModel/SelectBrowserViewModel.cs @@ -17,6 +17,8 @@ public partial class SelectBrowserViewModel : BaseModel get => selectedCustomBrowserIndex; set { + // When one custom browser is selected and removed, the index will become -1, so we need to ignore this change + if (value < 0) return; if (selectedCustomBrowserIndex != value) { selectedCustomBrowserIndex = value; diff --git a/Flow.Launcher/ViewModel/SelectFileManagerViewModel.cs b/Flow.Launcher/ViewModel/SelectFileManagerViewModel.cs index 253f74b47..b0851b90c 100644 --- a/Flow.Launcher/ViewModel/SelectFileManagerViewModel.cs +++ b/Flow.Launcher/ViewModel/SelectFileManagerViewModel.cs @@ -21,6 +21,8 @@ public partial class SelectFileManagerViewModel : BaseModel get => selectedCustomExplorerIndex; set { + // When one custom file manager is selected and removed, the index will become -1, so we need to ignore this change + if (value < 0) return; if (selectedCustomExplorerIndex != value) { selectedCustomExplorerIndex = value;