Merging in Theme changes and moving win32Tests to Microsoft.Plugin.Program.UnitTests

This commit is contained in:
ryanbodrug-microsoft
2020-06-26 10:45:40 -07:00
parent 3295ea84a4
commit 030dfc2370
17 changed files with 1014 additions and 731 deletions

View File

@@ -61,20 +61,6 @@ namespace Microsoft.Plugin.Program.Views.Commands
Enabled = t1.Enabled
}
));
Main._uwps
.Where(t1 => !ProgramSetting.ProgramSettingDisplayList.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier))
.ToList()
.ForEach(t1 => ProgramSetting.ProgramSettingDisplayList
.Add(
new ProgramSource
{
Name = t1.DisplayName,
Location = t1.Package.Location,
UniqueIdentifier = t1.UniqueIdentifier,
Enabled = t1.Enabled
}
));
}
internal static void SetProgramSourcesStatus(this List<ProgramSource> list, List<ProgramSource> selectedProgramSourcesToDisable, bool status)
@@ -88,11 +74,6 @@ namespace Microsoft.Plugin.Program.Views.Commands
.Where(t1 => selectedProgramSourcesToDisable.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier && t1.Enabled != status))
.ToList()
.ForEach(t1 => t1.Enabled = status);
Main._uwps
.Where(t1 => selectedProgramSourcesToDisable.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier && t1.Enabled != status))
.ToList()
.ForEach(t1 => t1.Enabled = status);
}
internal static void StoreDisabledInSettings(this List<ProgramSource> list)
@@ -133,7 +114,7 @@ namespace Microsoft.Plugin.Program.Views.Commands
internal static bool IsReindexRequired(this List<ProgramSource> selectedItems)
{
if (selectedItems.Where(t1 => t1.Enabled && !Main._uwps.Any(x => t1.UniqueIdentifier == x.UniqueIdentifier)).Count() > 0
if (selectedItems.Where(t1 => t1.Enabled).Count() > 0
&& selectedItems.Where(t1 => t1.Enabled && !Main._win32s.Any(x => t1.UniqueIdentifier == x.UniqueIdentifier)).Count() > 0)
return true;

View File

@@ -51,7 +51,6 @@ namespace Microsoft.Plugin.Program.Views
Task.Run(() =>
{
Dispatcher.Invoke(() => { indexingPanel.Visibility = Visibility.Visible; });
Main.IndexPrograms();
Dispatcher.Invoke(() => { indexingPanel.Visibility = Visibility.Hidden; });
});
}