updating: remove previous progress toasts

toast notifications:
- add method for removing existing toasts
- add method for updating existing toast contents/title
- refactoring
This commit is contained in:
yuyoyuppe
2020-10-20 14:00:06 +03:00
committed by Andrey Nekrasov
parent 5593f81242
commit 5e772340bc
9 changed files with 251 additions and 190 deletions

View File

@@ -301,8 +301,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
return 0;
}
case SpecialMode::ReportSuccessfulUpdate:
notifications::show_toast(localized_strings::PT_UPDATE_MESSAGE_BOX_TEXT, L"PowerToys");
{
notifications::remove_toasts(notifications::UPDATING_PROCESS_TOAST_TAG);
notifications::show_toast(localized_strings::PT_UPDATE_MESSAGE_BOX_TEXT,
L"PowerToys",
notifications::toast_params{ notifications::UPDATING_PROCESS_TOAST_TAG });
break;
}
case SpecialMode::None:
// continue as usual