fix: special shortcut for Windows live notifications (#5975)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "common/Channel.hpp"
|
||||
#include "common/ChatterinoSetting.hpp"
|
||||
#include "common/enums/MessageOverflow.hpp"
|
||||
#include "common/Modes.hpp"
|
||||
#include "common/SignalVector.hpp"
|
||||
#include "controllers/filters/FilterRecord.hpp"
|
||||
#include "controllers/highlights/HighlightBadge.hpp"
|
||||
@@ -553,6 +554,12 @@ public:
|
||||
"/notifications/suppressInitialLive", false};
|
||||
|
||||
BoolSetting notificationToast = {"/notifications/enableToast", false};
|
||||
BoolSetting createShortcutForToasts = {
|
||||
"/notifications/createShortcutForToasts",
|
||||
(Modes::instance().isPortable || Modes::instance().isExternallyPackaged)
|
||||
? false
|
||||
: true,
|
||||
};
|
||||
IntSetting openFromToast = {"/notifications/openFromToast",
|
||||
static_cast<int>(ToastReaction::OpenInBrowser)};
|
||||
|
||||
|
||||
@@ -284,11 +284,13 @@ void Toasts::ensureInitialized()
|
||||
this->initialized_ = true;
|
||||
|
||||
auto *instance = WinToast::instance();
|
||||
instance->setAppName(L"Chatterino2");
|
||||
instance->setAppName(L"Chatterino");
|
||||
instance->setAppUserModelId(
|
||||
WinToast::configureAUMI(L"", L"Chatterino 2", L"",
|
||||
Version::instance().version().toStdWString()));
|
||||
instance->setShortcutPolicy(WinToast::SHORTCUT_POLICY_IGNORE);
|
||||
WinToast::configureAUMI(L"ChatterinoTeam", L"Chatterino", L"", L""));
|
||||
if (!getSettings()->createShortcutForToasts)
|
||||
{
|
||||
instance->setShortcutPolicy(WinToast::SHORTCUT_POLICY_IGNORE);
|
||||
}
|
||||
WinToast::WinToastError error{};
|
||||
instance->initialize(&error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user