Skip to content

Commit a03f628

Browse files
committed
Ignore index change for -1
1 parent dd07baf commit a03f628

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Flow.Launcher/ViewModel/SelectBrowserViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public int SelectedCustomBrowserIndex
1717
get => selectedCustomBrowserIndex;
1818
set
1919
{
20+
// When one custom browser is selected and removed, the index will become -1, so we need to ignore this change
21+
if (value < 0) return;
2022
if (selectedCustomBrowserIndex != value)
2123
{
2224
selectedCustomBrowserIndex = value;

Flow.Launcher/ViewModel/SelectFileManagerViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public int SelectedCustomExplorerIndex
2121
get => selectedCustomExplorerIndex;
2222
set
2323
{
24+
// When one custom file manager is selected and removed, the index will become -1, so we need to ignore this change
25+
if (value < 0) return;
2426
if (selectedCustomExplorerIndex != value)
2527
{
2628
selectedCustomExplorerIndex = value;

0 commit comments

Comments
 (0)