mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Rearrange query execution order
1. remove usage of PushResult 2. rearrange query execution order 3. decouple UserSetting dependency 4. remove instant query 5. remove backkeydown event 6. part of #389
This commit is contained in:
@@ -21,7 +21,6 @@ namespace Wox.Plugin.Folder
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
this.context = context;
|
||||
this.context.API.BackKeyDownEvent += ApiBackKeyDownEvent;
|
||||
InitialDriverList();
|
||||
if (FolderStorage.Instance.FolderLinks == null)
|
||||
{
|
||||
@@ -30,26 +29,6 @@ namespace Wox.Plugin.Folder
|
||||
}
|
||||
}
|
||||
|
||||
private void ApiBackKeyDownEvent(WoxKeyDownEventArgs e)
|
||||
{
|
||||
string query = e.Query;
|
||||
if (Directory.Exists(query))
|
||||
{
|
||||
if (query.EndsWith("\\"))
|
||||
{
|
||||
query = query.Remove(query.Length - 1);
|
||||
}
|
||||
|
||||
if (query.Contains("\\"))
|
||||
{
|
||||
int index = query.LastIndexOf("\\");
|
||||
query = query.Remove(index) + "\\";
|
||||
}
|
||||
|
||||
context.API.ChangeQuery(query);
|
||||
}
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
string input = query.Search.ToLower();
|
||||
|
||||
Reference in New Issue
Block a user