Ignore index change for -1

This commit is contained in:
Jack251970 2025-09-18 12:08:49 +08:00
parent dd07baff59
commit a03f62832a
2 changed files with 4 additions and 0 deletions

View file

@ -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;

View file

@ -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;