Skip items that are not enabled when creating jump list (#1333)

* Fix jumplist bug

* Add extra check
This commit is contained in:
Pepe Rivera 2020-08-06 12:28:38 -07:00 committed by GitHub
commit 258833f266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 1 deletions

View file

@ -148,6 +148,10 @@ task<void> App::SetupJumpList()
for (NavCategory ^ option : calculatorOptions->Categories)
{
if (!option->IsEnabled)
{
continue;
}
ViewMode mode = option->Mode;
auto item = JumpListItem::CreateWithArguments(((int)mode).ToString(), L"ms-resource:///Resources/" + NavCategory::GetNameResourceKey(mode));
item->Description = L"ms-resource:///Resources/" + NavCategory::GetNameResourceKey(mode);