fix edit & remove for IndexExcludedPath

This commit is contained in:
Hongtao Zhang 2022-11-04 01:29:18 -05:00
parent cc79079045
commit 8b856c223e
No known key found for this signature in database
GPG key ID: 75F655B91C7AC9BB

View file

@ -179,7 +179,7 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
var container = containerName switch
{
"QuickAccessLink" => Settings.QuickAccessLinks,
"IndexSearchExcludedPath" => Settings.IndexSearchExcludedSubdirectoryPaths,
"IndexSearchExcludedPaths" => Settings.IndexSearchExcludedSubdirectoryPaths,
_ => throw new ArgumentException($"Unknown container name: {containerName}")
};
container.Add(link);
@ -190,7 +190,7 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
(AccessLink selectedLink, ObservableCollection<AccessLink> collection) = commandParameter switch
{
"QuickAccessLink" => (SelectedQuickAccessLink, Settings.QuickAccessLinks),
"IndexSearchExcludedPath" => (SelectedIndexSearchExcludedPath, Settings.IndexSearchExcludedSubdirectoryPaths),
"IndexSearchExcludedPaths" => (SelectedIndexSearchExcludedPath, Settings.IndexSearchExcludedSubdirectoryPaths),
_ => throw new ArgumentOutOfRangeException(nameof(commandParameter))
};
@ -409,4 +409,4 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
}
}
}