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:
Cheng Zhao 2016-04-15 16:01:21 +09:00
parent 77ca9bc76e
commit ddee77fae4

View file

@ -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();