Restoring checks for invalid uwp apps based on PR feedback. This was accidentally removed when moving the initialize outside the constructor.

This commit is contained in:
ryanbodrug-microsoft
2020-07-08 15:30:44 -07:00
parent 1c724280f5
commit 0e8c1cb0fd

View File

@@ -71,7 +71,15 @@ namespace Microsoft.Plugin.Program.Programs
apps.Add(app);
}
Apps = apps.Where(a => a.AppListEntry != "none").ToArray();
Apps = apps.Where(a =>
{
var valid =
!string.IsNullOrEmpty(a.UserModelId) &&
!string.IsNullOrEmpty(a.DisplayName) &&
a.AppListEntry != "none";
return valid;
}).ToArray();
}
else
{