mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Check modified & use IDictionary
This commit is contained in:
parent
194871189e
commit
9b92061807
2 changed files with 7 additions and 5 deletions
|
|
@ -481,14 +481,16 @@ namespace Flow.Launcher.Core.Plugin
|
|||
return _homePlugins.Where(p => !PluginModified(p.Metadata.ID)).Any(p => p.Metadata.ID == id);
|
||||
}
|
||||
|
||||
public static Dictionary<PluginPair, List<BasePluginHotkey>> GetPluginHotkeyInfo()
|
||||
public static IDictionary<PluginPair, List<BasePluginHotkey>> GetPluginHotkeyInfo()
|
||||
{
|
||||
return _pluginHotkeyInfo;
|
||||
return _pluginHotkeyInfo.Where(p => !PluginModified(p.Key.Metadata.ID))
|
||||
.ToDictionary(p => p.Key, p => p.Value);
|
||||
}
|
||||
|
||||
public static Dictionary<HotkeyModel, List<(PluginMetadata Metadata, SearchWindowPluginHotkey SearchWindowPluginHotkey)>> GetWindowPluginHotkeys()
|
||||
public static IDictionary<HotkeyModel, List<(PluginMetadata Metadata, SearchWindowPluginHotkey SearchWindowPluginHotkey)>> GetWindowPluginHotkeys()
|
||||
{
|
||||
return _windowPluginHotkeys;
|
||||
// Here we do not need to check PluginModified since we will check it in hotkey events
|
||||
return _windowPluginHotkeys.ToDictionary(p => p.Key, p => p.Value);
|
||||
}
|
||||
|
||||
public static void UpdatePluginHotkeyInfoTranslations()
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
/// Update plugin hotkey information in metadata and plugin setting.
|
||||
/// </summary>
|
||||
/// <param name="hotkeyPluginInfo"></param>
|
||||
public void UpdatePluginHotkeyInfo(Dictionary<PluginPair, List<BasePluginHotkey>> hotkeyPluginInfo)
|
||||
public void UpdatePluginHotkeyInfo(IDictionary<PluginPair, List<BasePluginHotkey>> hotkeyPluginInfo)
|
||||
{
|
||||
foreach (var info in hotkeyPluginInfo)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue