Skip to content

Commit 0a19b02

Browse files
Fix merge
1 parent 184aa57 commit 0a19b02

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ public AddProgramSource(PluginInitContext context, Settings settings)
2727
btnAdd.Content = _context.API.GetTranslation("flowlauncher_plugin_program_add");
2828
}
2929

30-
public AddProgramSource(ProgramSource edit, Settings settings)
30+
public AddProgramSource(ProgramSource source, Settings settings)
3131
{
3232
InitializeComponent();
33-
_updating = source;
33+
_editing = source;
3434
_settings = settings;
3535
update = true;
36-
Chkbox.IsChecked = _updating.Enabled;
37-
Directory.Text = _updating.Location;
36+
Chkbox.IsChecked = _editing.Enabled;
37+
Directory.Text = _editing.Location;
3838
}
3939

4040
private void BrowseButton_Click(object sender, RoutedEventArgs e)
@@ -72,8 +72,8 @@ private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
7272
}
7373
else
7474
{
75-
_updating.Location = path;
76-
_updating.Enabled = Chkbox.IsChecked ?? true; // Fixme, need to add to disabled source if not custom source
75+
_editing.Location = path;
76+
_editing.Enabled = Chkbox.IsChecked ?? true; // Fixme, need to add to disabled source if not custom source
7777
}
7878

7979
DialogResult = true;

Plugins/Flow.Launcher.Plugin.Program/Main.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,24 @@ private static void DisableProgram(IProgram programToDelete)
194194
{
195195
_uwps.First(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)
196196
.Enabled = false;
197-
197+
var t1 = Task.Run(() =>
198+
{
199+
IndexWin32Programs();
200+
_settings.DisabledProgramSources.Add(new DisabledProgramSource(programToDelete));
201+
_settings.LastIndexTime = DateTime.Today;
202+
});
198203
}
199-
200-
if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
204+
else if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier))
201205
{
202206
_win32s.First(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)
203207
.Enabled = false;
208+
var t1 = Task.Run(() =>
209+
{
210+
IndexUwpPrograms();
211+
_settings.DisabledProgramSources.Add(new DisabledProgramSource(programToDelete));
212+
_settings.LastIndexTime = DateTime.Today;
213+
});
204214
}
205-
206-
_settings.DisabledProgramSources.Add(new DisabledProgramSource(programToDelete));
207215
}
208216

209217
public static void StartProcess(Func<ProcessStartInfo, Process> runProcess, ProcessStartInfo info)

0 commit comments

Comments
 (0)