Fix global query determination issue

This commit is contained in:
Jack251970 2025-04-11 16:13:55 +08:00
parent 01f896a578
commit e6477e886b
2 changed files with 5 additions and 4 deletions

View file

@ -1208,11 +1208,11 @@ namespace Flow.Launcher.ViewModel
_lastQuery = query;
if (query.ActionKeyword == Plugin.Query.GlobalPluginWildcardSign)
if (string.IsNullOrEmpty(query.ActionKeyword))
{
// Wait 45 millisecond for query change in global query
// Wait 15 millisecond for query change in global query
// if query changes, return so that it won't be calculated
await Task.Delay(45, _updateSource.Token);
await Task.Delay(15, _updateSource.Token);
if (_updateSource.Token.IsCancellationRequested)
return;
}

View file

@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing.Text;
using System.IO;
@ -137,7 +138,7 @@ namespace Flow.Launcher.ViewModel
}
}
public bool IsGlobalQuery => Result.OriginQuery.ActionKeyword == Query.GlobalPluginWildcardSign;
public bool IsGlobalQuery => string.IsNullOrEmpty(Result.OriginQuery.ActionKeyword);
private bool GlyphAvailable => Glyph is not null;