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

@@ -9,6 +9,7 @@
namespace notifications
{
constexpr inline const wchar_t TOAST_ACTIVATED_LAUNCH_ARG[] = L"-ToastActivated";
constexpr inline const wchar_t UPDATING_PROCESS_TOAST_TAG[] = L"PTUpdateNotifyTag";
void override_application_id(const std::wstring_view appID);
void register_background_toast_handler();
@@ -59,5 +60,7 @@ namespace notifications
void show_toast(std::wstring plaintext_message, std::wstring title, toast_params params = {});
void show_toast_with_activations(std::wstring plaintext_message, std::wstring title, std::wstring_view background_handler_id, std::vector<action_t> actions, toast_params params = {});
void update_progress_bar_toast(std::wstring_view tag, progress_bar_params params);
void update_toast_progress_bar(std::wstring_view tag, progress_bar_params params);
void update_toast_contents(std::wstring_view tag, std::wstring plaintext_message, std::wstring title);
void remove_toasts(std::wstring_view tag);
}