add backwards compatibility with old list

This commit is contained in:
Jeremy Wu 2021-01-26 21:09:35 +11:00
parent 82d91840c1
commit dd57bfc6f8
2 changed files with 9 additions and 0 deletions

View file

@ -3,6 +3,7 @@ using Flow.Launcher.Plugin.Explorer.Search;
using Flow.Launcher.Plugin.Explorer.ViewModels;
using Flow.Launcher.Plugin.Explorer.Views;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
@ -32,6 +33,11 @@ namespace Flow.Launcher.Plugin.Explorer
viewModel = new SettingsViewModel(context);
await viewModel.LoadStorage();
Settings = viewModel.Settings;
// as at v1.7.0 this is to maintain backwards compatibility, need to be removed afterwards.
if (Settings.QuickFolderAccessLinks.Any())
Settings.QuickAccessLinks = Settings.QuickFolderAccessLinks;
contextMenu = new ContextMenu(Context, Settings);
searchManager = new SearchManager(Settings, Context);
}

View file

@ -10,6 +10,9 @@ namespace Flow.Launcher.Plugin.Explorer
public List<AccessLink> QuickAccessLinks { get; set; } = new List<AccessLink>();
// as at v1.7.0 this is to maintain backwards compatibility, need to be removed afterwards.
public List<AccessLink> QuickFolderAccessLinks { get; set; } = new List<AccessLink>();
public bool UseWindowsIndexForDirectorySearch { get; set; } = true;
public List<AccessLink> IndexSearchExcludedSubdirectoryPaths { get; set; } = new List<AccessLink>();