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)
128
128
await indexTask ;
129
129
130
130
Win32 . WatchProgramUpdate ( _settings ) ;
131
- UWP . WatchUWPInstallation ( ) ;
131
+ UWP . WatchPackageChange ( ) ;
132
132
}
133
133
134
134
public static void IndexWin32Programs ( )
Original file line number Diff line number Diff line change 18
18
using Rect = System . Windows . Rect ;
19
19
using Flow . Launcher . Plugin . SharedModels ;
20
20
using Flow . Launcher . Infrastructure . Logger ;
21
+ using System . Runtime . Versioning ;
21
22
22
23
namespace Flow . Launcher . Plugin . Program . Programs
23
24
{
@@ -251,12 +252,13 @@ private static void GenerateWatcher(string path)
251
252
watcher . EnableRaisingEvents = true ;
252
253
}
253
254
254
- public static void WatchUWPInstallation ( )
255
+ public static void WatchPackageChange ( )
255
256
{
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
+ } ;
260
262
}
261
263
262
264
public override string ToString ( )
You can’t perform that action at this time.
0 commit comments