refactor(notifications): remove platform specifier (#5914)

This commit is contained in:
apa420
2025-02-09 12:53:25 +01:00
committed by GitHub
parent b01f50856d
commit 7dad35b7a7
5 changed files with 35 additions and 52 deletions
+2 -6
View File
@@ -3,12 +3,8 @@
#include <pajlada/settings/setting.hpp>
#include <QString>
#include <cstdint>
namespace chatterino {
enum class Platform : uint8_t;
enum class ToastReaction {
OpenInBrowser = 0,
OpenInPlayer = 1,
@@ -22,7 +18,7 @@ public:
~Toasts();
void sendChannelNotification(const QString &channelName,
const QString &channelTitle, Platform p);
const QString &channelTitle);
static QString findStringFromReaction(const ToastReaction &reaction);
static QString findStringFromReaction(
const pajlada::Settings::Setting<int> &reaction);
@@ -33,7 +29,7 @@ private:
#ifdef Q_OS_WIN
void ensureInitialized();
void sendWindowsNotification(const QString &channelName,
const QString &channelTitle, Platform p);
const QString &channelTitle);
bool initialized_ = false;
#elif defined(CHATTERINO_WITH_LIBNOTIFY)