Update load programsources with uniqueidentifier

This commit is contained in:
Jeremy Wu
2019-09-11 08:01:38 +10:00
parent 1ca9389110
commit 81e252d564

View File

@@ -13,7 +13,15 @@ namespace Wox.Plugin.Program.Views.Commands
{ {
var list = new List<ProgramSource>(); var list = new List<ProgramSource>();
programSources.ForEach(x => list.Add(new ProgramSource { Enabled = x.Enabled, Location = x.Location, Name = x.Name })); programSources.ForEach(x => list
.Add(
new ProgramSource {
Enabled = x.Enabled,
Location = x.Location,
Name = x.Name,
UniqueIdentifier = x.UniqueIdentifier
}
));
return list; return list;
} }
@@ -30,7 +38,8 @@ namespace Wox.Plugin.Program.Views.Commands
Location = t1.ParentDirectory, Location = t1.ParentDirectory,
UniqueIdentifier = t1.UniqueIdentifier, UniqueIdentifier = t1.UniqueIdentifier,
Enabled = t1.Enabled Enabled = t1.Enabled
})); }
));
Main._uwps Main._uwps
.Where(t1 => !ProgramSetting.ProgramSettingDisplayList.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier)) .Where(t1 => !ProgramSetting.ProgramSettingDisplayList.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier))