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:
bao-qian
2016-03-28 01:09:40 +01:00
parent 7eea6ebe57
commit c596039453
10 changed files with 77 additions and 97 deletions

View File

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