mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Do not show setting panel for init failed plugins
This commit is contained in:
parent
324b3eb081
commit
67c940f3a8
2 changed files with 12 additions and 1 deletions
|
|
@ -533,7 +533,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
else
|
||||
{
|
||||
return [.. _allInitializedPlugins.Values
|
||||
.Where(p => !_initFailedPlugins.ContainsKey(p.Metadata.ID))];
|
||||
.Where(p => !IsInitFailed(p.Metadata.ID))];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -596,6 +596,15 @@ namespace Flow.Launcher.Core.Plugin
|
|||
|
||||
#endregion
|
||||
|
||||
#region Check Init Failed
|
||||
|
||||
public static bool IsInitFailed(string id)
|
||||
{
|
||||
return _initFailedPlugins.ContainsKey(id);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Plugin Action Keyword
|
||||
|
||||
public static bool ActionKeywordRegistered(string actionKeyword)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,9 @@ namespace Flow.Launcher.ViewModel
|
|||
public Control BottomPart2 => IsExpanded ? _bottomPart2 ??= new InstalledPluginDisplayBottomData() : null;
|
||||
|
||||
public bool HasSettingControl => PluginPair.Plugin is ISettingProvider &&
|
||||
PluginManager.IsInitFailed(PluginPair.Metadata.ID) && // Do not show setting panel for init failed plugins
|
||||
(PluginPair.Plugin is not JsonRPCPluginBase jsonRPCPluginBase || jsonRPCPluginBase.NeedCreateSettingPanel());
|
||||
|
||||
public Control SettingControl
|
||||
=> IsExpanded
|
||||
? _settingControl
|
||||
|
|
|
|||
Loading…
Reference in a new issue