Merge remote-tracking branch 'origin/dev' into OrderByOpt

This commit is contained in:
Jeremy Wu 2021-01-24 20:24:49 +11:00
commit 4944a001d6
5 changed files with 19 additions and 19 deletions

View file

@ -1,4 +1,4 @@
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Logger;
using Microsoft.Search.Interop;
using System;
using System.Collections.Generic;
@ -15,7 +15,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.WindowsIndex
private readonly ResultManager resultManager;
// Reserved keywords in oleDB
private readonly string reservedStringPattern = @"^[\/\\\$\%_]+$";
private readonly string reservedStringPattern = @"^[`\@\#\^,\&\/\\\$\%_]+$";
internal IndexSearch(PluginInitContext context)
{

View file

@ -1,7 +1,6 @@
using Flow.Launcher.Plugin.Explorer.Search;
using Flow.Launcher.Plugin.Explorer.Search.FolderLinks;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Flow.Launcher.Plugin.Explorer
{

View file

@ -7,7 +7,7 @@
"Name": "Explorer",
"Description": "Search and manage files and folders. Explorer utilises Windows Index Search",
"Author": "Jeremy Wu",
"Version": "1.3.0",
"Version": "1.3.1",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Explorer.dll",

View file

@ -41,6 +41,9 @@ namespace Flow.Launcher.Plugin.Program
public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
{
if (IsStartupIndexProgramsRequired)
_ = IndexPrograms();
Win32[] win32;
UWP.Application[] uwps;
@ -147,7 +150,7 @@ namespace Flow.Launcher.Plugin.Program
var t2 = Task.Run(IndexUwpPrograms);
await Task.WhenAll(t1, t2);
await Task.WhenAll(t1, t2).ConfigureAwait(false);
_settings.LastIndexTime = DateTime.Today;
}

View file

@ -51,7 +51,7 @@ namespace Flow.Launcher.Plugin.Program.Views
private void ViewRefresh()
{
if(programSourceView.Items.Count == 0
if (programSourceView.Items.Count == 0
&& btnProgramSourceStatus.Visibility == Visibility.Visible
&& btnEditProgramSource.Visibility == Visibility.Visible)
{
@ -70,21 +70,19 @@ namespace Flow.Launcher.Plugin.Program.Views
programSourceView.Items.Refresh();
}
private void ReIndexing()
private async void ReIndexing()
{
ViewRefresh();
Task.Run(() =>
{
Dispatcher.Invoke(() => { indexingPanel.Visibility = Visibility.Visible; });
Main.IndexPrograms();
Dispatcher.Invoke(() => { indexingPanel.Visibility = Visibility.Hidden; });
});
indexingPanel.Visibility = Visibility.Visible;
await Main.IndexPrograms();
indexingPanel.Visibility = Visibility.Hidden;
}
private void btnAddProgramSource_OnClick(object sender, RoutedEventArgs e)
{
var add = new AddProgramSource(context, _settings);
if(add.ShowDialog() ?? false)
if (add.ShowDialog() ?? false)
{
ReIndexing();
}
@ -165,14 +163,14 @@ namespace Flow.Launcher.Plugin.Program.Views
UniqueIdentifier = directory
};
directoriesToAdd.Add(source);
directoriesToAdd.Add(source);
}
}
if (directoriesToAdd.Count() > 0)
{
directoriesToAdd.ForEach(x => _settings.ProgramSources.Add(x));
directoriesToAdd.ForEach(x => ProgramSettingDisplayList.Add(x));
directoriesToAdd.ForEach(x => ProgramSettingDisplayList.Add(x));
ViewRefresh();
ReIndexing();
@ -238,8 +236,8 @@ namespace Flow.Launcher.Plugin.Program.Views
ProgramSettingDisplayList.SetProgramSourcesStatus(selectedItems, true);
ProgramSettingDisplayList.RemoveDisabledFromSettings();
}
}
if (selectedItems.IsReindexRequired())
ReIndexing();
@ -282,7 +280,7 @@ namespace Flow.Launcher.Plugin.Program.Views
var sortBy = columnBinding?.Path.Path ?? headerClicked.Column.Header as string;
Sort(sortBy, direction);
_lastHeaderClicked = headerClicked;
_lastDirection = direction;
}