File tree Expand file tree Collapse file tree 1 file changed +36
-1
lines changed
Flow.Launcher.Core/Plugin Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -665,7 +665,7 @@ public static bool IsHomePlugin(string id)
665
665
666
666
#endregion
667
667
668
- #region Check Initializing or Init Failed
668
+ #region Check Initializing & Init Failed
669
669
670
670
public static bool IsInitializingOrInitFailed ( string id )
671
671
{
@@ -685,6 +685,41 @@ public static bool IsInitializingOrInitFailed(string id)
685
685
}
686
686
}
687
687
688
+ public static bool IsInitializing ( string id )
689
+ {
690
+ // Id does not exist in loaded plugins
691
+ if ( ! _allLoadedPlugins . Any ( x => x . Value . Metadata . ID == id ) ) return false ;
692
+
693
+ // Plugin initialized already
694
+ if ( _allInitializedPlugins . ContainsKey ( id ) )
695
+ {
696
+ return false ;
697
+ }
698
+ // Plugin is still initializing
699
+ else
700
+ {
701
+ return true ;
702
+ }
703
+ }
704
+
705
+ public static bool IsInitializationFailed ( string id )
706
+ {
707
+ // Id does not exist in loaded plugins
708
+ if ( ! _allLoadedPlugins . Any ( x => x . Value . Metadata . ID == id ) ) return false ;
709
+
710
+ // Plugin initialized already
711
+ if ( _allInitializedPlugins . ContainsKey ( id ) )
712
+ {
713
+ // Check if the plugin initialization failed
714
+ return _initFailedPlugins . ContainsKey ( id ) ;
715
+ }
716
+ // Plugin is still initializing
717
+ else
718
+ {
719
+ return false ;
720
+ }
721
+ }
722
+
688
723
#endregion
689
724
690
725
#region Plugin Action Keyword
You can’t perform that action at this time.
0 commit comments