File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
Flow.Launcher.Core/Plugin Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ public static List<PluginPair> GetAllInitializedPlugins(bool containFailed)
533533 else
534534 {
535535 return [ .. _allInitializedPlugins . Values
536- . Where ( p => ! IsInitFailed ( p . Metadata . ID ) ) ] ;
536+ . Where ( p => ! _initFailedPlugins . ContainsKey ( p . Metadata . ID ) ) ] ;
537537 }
538538 }
539539
@@ -596,11 +596,24 @@ public static bool IsHomePlugin(string id)
596596
597597 #endregion
598598
599- #region Check Init Failed
599+ #region Check Initializing or Init Failed
600600
601- public static bool IsInitFailed ( string id )
601+ public static bool IsInitializingOrInitFailed ( string id )
602602 {
603- return _initFailedPlugins . ContainsKey ( id ) ;
603+ // Id does not exist in loaded plugins
604+ if ( ! _allLoadedPlugins . Any ( x => x . Metadata . ID == id ) ) return false ;
605+
606+ // Plugin initialized already
607+ if ( _allInitializedPlugins . ContainsKey ( id ) )
608+ {
609+ // Check if the plugin initialization failed
610+ return _initFailedPlugins . ContainsKey ( id ) ;
611+ }
612+ // Plugin is still initializing
613+ else
614+ {
615+ return true ;
616+ }
604617 }
605618
606619 #endregion
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ public double PluginSearchDelayTime
121121 public Control BottomPart2 => IsExpanded ? _bottomPart2 ??= new InstalledPluginDisplayBottomData ( ) : null ;
122122
123123 public bool HasSettingControl =>
124- ! PluginManager . IsInitFailed ( PluginPair . Metadata . ID ) && // Do not show setting panel for init failed plugins
124+ ! PluginManager . IsInitializingOrInitFailed ( PluginPair . Metadata . ID ) && // Do not show setting panel for initializing or init failed plugins
125125 PluginPair . Plugin is ISettingProvider &&
126126 ( PluginPair . Plugin is not JsonRPCPluginBase jsonRPCPluginBase || // Is not JsonRPC plugin
127127 jsonRPCPluginBase . NeedCreateSettingPanel ( ) ) ; // Is JsonRPC plugin and need to create setting panel
You can’t perform that action at this time.
0 commit comments