From ddee77fae4ed1bce6e35dd2889bcdbd945015ef6 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 15 Apr 2016 16:01:21 +0900 Subject: [PATCH] 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. --- brightray/browser/win/windows_toast_notification.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/brightray/browser/win/windows_toast_notification.cc b/brightray/browser/win/windows_toast_notification.cc index 401473b9c3..24e1319715 100644 --- a/brightray/browser/win/windows_toast_notification.cc +++ b/brightray/browser/win/windows_toast_notification.cc @@ -90,16 +90,7 @@ void WindowsToastNotification::Show( const bool silent) { auto presenter_win = static_cast(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 toast_xml; if(FAILED(GetToastXml(toast_manager_.Get(), title, msg, icon_path, silent, &toast_xml))) { NotificationFailed();