mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Change call method for default hotkeys.
Remove extra whitespace add await using for stream
This commit is contained in:
parent
f32e202746
commit
f0267475f5
2 changed files with 4 additions and 4 deletions
|
|
@ -50,7 +50,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
var search = query.Search.ToLower();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(search))
|
||||
return Settings.HotKeys;
|
||||
return pluginManager.GetDefaultHotKeys();
|
||||
|
||||
if ((DateTime.Now - _lastUpdateTime).TotalHours > 12) // 12 hours
|
||||
{
|
||||
|
|
@ -66,7 +66,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
var s when s.StartsWith(Settings.HotKeyInstall) => pluginManager.RequestInstallOrUpdate(s),
|
||||
var s when s.StartsWith(Settings.HotkeyUninstall) => pluginManager.RequestUninstall(s),
|
||||
var s when s.StartsWith(Settings.HotkeyUpdate) => pluginManager.RequestUpdate(s),
|
||||
_ => Settings.HotKeys.Where(hotkey =>
|
||||
_ => pluginManager.GetDefaultHotKeys().Where(hotkey =>
|
||||
{
|
||||
hotkey.Score = StringMatcher.FuzzySearch(search, hotkey.Title).Score;
|
||||
return hotkey.Score > 0;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Flow.Launcher.Plugin.PluginsManager.Models
|
|||
{
|
||||
try
|
||||
{
|
||||
var jsonStream = await Http.GetStreamAsync("https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/main/plugins.json")
|
||||
await using var jsonStream = await Http.GetStreamAsync("https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/main/plugins.json")
|
||||
.ConfigureAwait(false);
|
||||
|
||||
UserPlugins = await JsonSerializer.DeserializeAsync<List<UserPlugin>>(jsonStream).ConfigureAwait(false);
|
||||
|
|
@ -33,4 +33,4 @@ namespace Flow.Launcher.Plugin.PluginsManager.Models
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue