Skip to content

Commit f026747

Browse files
committed
Change call method for default hotkeys.
Remove extra whitespace add await using for stream
1 parent f32e202 commit f026747

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public List<Result> Query(Query query)
5050
var search = query.Search.ToLower();
5151

5252
if (string.IsNullOrWhiteSpace(search))
53-
return Settings.HotKeys;
53+
return pluginManager.GetDefaultHotKeys();
5454

5555
if ((DateTime.Now - _lastUpdateTime).TotalHours > 12) // 12 hours
5656
{
@@ -66,7 +66,7 @@ public List<Result> Query(Query query)
6666
var s when s.StartsWith(Settings.HotKeyInstall) => pluginManager.RequestInstallOrUpdate(s),
6767
var s when s.StartsWith(Settings.HotkeyUninstall) => pluginManager.RequestUninstall(s),
6868
var s when s.StartsWith(Settings.HotkeyUpdate) => pluginManager.RequestUpdate(s),
69-
_ => Settings.HotKeys.Where(hotkey =>
69+
_ => pluginManager.GetDefaultHotKeys().Where(hotkey =>
7070
{
7171
hotkey.Score = StringMatcher.FuzzySearch(search, hotkey.Title).Score;
7272
return hotkey.Score > 0;

Plugins/Flow.Launcher.Plugin.PluginsManager/Models/PluginsManifest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ internal async Task DownloadManifest()
1919
{
2020
try
2121
{
22-
var jsonStream = await Http.GetStreamAsync("https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/main/plugins.json")
22+
await using var jsonStream = await Http.GetStreamAsync("https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher.PluginsManifest/main/plugins.json")
2323
.ConfigureAwait(false);
2424

2525
UserPlugins = await JsonSerializer.DeserializeAsync<List<UserPlugin>>(jsonStream).ConfigureAwait(false);
@@ -33,4 +33,4 @@ internal async Task DownloadManifest()
3333

3434
}
3535
}
36-
}
36+
}

0 commit comments

Comments
 (0)