File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Plugins/Flow.Launcher.Plugin.Program Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ public async Task InitAsync(PluginInitContext context)
128128 await indexTask ;
129129
130130 Win32 . WatchProgramUpdate ( _settings ) ;
131- UWP . WatchUWPInstallation ( ) ;
131+ UWP . WatchPackageChange ( ) ;
132132 }
133133
134134 public static void IndexWin32Programs ( )
Original file line number Diff line number Diff line change 1818using Rect = System . Windows . Rect ;
1919using Flow . Launcher . Plugin . SharedModels ;
2020using Flow . Launcher . Infrastructure . Logger ;
21+ using System . Runtime . Versioning ;
2122
2223namespace Flow . Launcher . Plugin . Program . Programs
2324{
@@ -251,12 +252,13 @@ private static void GenerateWatcher(string path)
251252 watcher . EnableRaisingEvents = true ;
252253 }
253254
254- public static void WatchUWPInstallation ( )
255+ public static void WatchPackageChange ( )
255256 {
256- PackageCatalog . OpenForCurrentUser ( ) . PackageStatusChanged += ( _ , _ ) =>
257- {
258- Task . Delay ( 10000 ) . ContinueWith ( t => Main . IndexUwpPrograms ( ) ) ;
259- } ;
257+ if ( Environment . OSVersion . Version . Build >= 19041 )
258+ PackageCatalog . OpenForCurrentUser ( ) . PackageStatusChanged += ( _ , _ ) =>
259+ {
260+ Task . Delay ( 10000 ) . ContinueWith ( t => Main . IndexUwpPrograms ( ) ) ;
261+ } ;
260262 }
261263
262264 public override string ToString ( )
You can’t perform that action at this time.
0 commit comments