Do not use get_Setting to determine whether notification is enabled
On Windows 10 get_Setting always returns DISABLED when the program has a AppUserModelID.
This commit is contained in:
parent
77ca9bc76e
commit
ddee77fae4
1 changed files with 1 additions and 10 deletions
|
@ -91,15 +91,6 @@ void WindowsToastNotification::Show(
|
|||
auto presenter_win = static_cast<NotificationPresenterWin*>(presenter());
|
||||
std::wstring icon_path = presenter_win->SaveIconToFilesystem(icon, icon_url);
|
||||
|
||||
// Ask Windows for the current notification settings
|
||||
// If not allowed, we return here (0 = enabled)
|
||||
ABI::Windows::UI::Notifications::NotificationSetting setting;
|
||||
toast_notifier_->get_Setting(&setting);
|
||||
if (setting != 0) {
|
||||
NotificationFailed();
|
||||
return;
|
||||
}
|
||||
|
||||
ComPtr<IXmlDocument> toast_xml;
|
||||
if(FAILED(GetToastXml(toast_manager_.Get(), title, msg, icon_path, silent, &toast_xml))) {
|
||||
NotificationFailed();
|
||||
|
|
Loading…
Reference in a new issue