- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 456
 
Auto re-index for Program and Bookmark plugins #967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
7305653
              9fc0e03
              50144ea
              af68cb5
              f42fd29
              0842091
              2b538d9
              25cc50b
              18acea3
              823fa38
              87e7ff5
              80eb0e4
              ef4bb12
              5404303
              a78956b
              7bda6ed
              2028218
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -18,7 +18,7 @@ | |
| 
     | 
||
| namespace Flow.Launcher.Plugin.Program | ||
| { | ||
| public class Main : ISettingProvider, IAsyncPlugin, IPluginI18n, IContextMenu, ISavable, IAsyncReloadable | ||
| public class Main : ISettingProvider, IAsyncPlugin, IPluginI18n, IContextMenu, ISavable, IAsyncReloadable, IDisposable | ||
| { | ||
| internal static Win32[] _win32s { get; set; } | ||
| internal static UWP.Application[] _uwps { get; set; } | ||
| 
          
            
          
           | 
    @@ -126,6 +126,9 @@ public async Task InitAsync(PluginInitContext context) | |
| 
     | 
||
| if (!(_win32s.Any() && _uwps.Any())) | ||
| await indexTask; | ||
| 
     | 
||
| Win32.WatchProgramUpdate(_settings); | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you not also need to add WatchProgramUpdate for UWP apps? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huh I forget? I will check soon. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah no. UWP are watched by package update  | 
||
| UWP.WatchPackageChange(); | ||
| } | ||
| 
     | 
||
| public static void IndexWin32Programs() | ||
| 
          
            
          
           | 
    @@ -209,13 +212,11 @@ private void DisableProgram(IProgram programToDelete) | |
| return; | ||
| 
     | 
||
| if (_uwps.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) | ||
| _uwps.Where(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier) | ||
| .FirstOrDefault() | ||
| _uwps.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)! | ||
                
      
                  jjw24 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| .Enabled = false; | ||
| 
     | 
||
| if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) | ||
| _win32s.Where(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier) | ||
| .FirstOrDefault() | ||
| _win32s.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)! | ||
| .Enabled = false; | ||
| 
     | 
||
| _settings.DisabledProgramSources | ||
| 
          
            
          
           | 
    @@ -248,5 +249,10 @@ public async Task ReloadDataAsync() | |
| { | ||
| await IndexPrograms(); | ||
| } | ||
| public void Dispose() | ||
| { | ||
| Win32.Dispose(); | ||
| UWP.Dispose(); | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.