refactor: Toast (#4899)

* Fixes a bug where avatars weren't loaded on fresh installations of Chatterino.
* Avatars now update every two weeks.
* Removes misleading `DownlaodManager` (now part of `Toasts.cpp`).
* Refactors usage of WinToast to be easier to read.
* Added version to AUMI.
* Removes manual `QString` → `std::wstring` conversions.
* Removes uses of implicit ASCII casts in `Toasts.cpp`, meaning it can be compiled with `QT_NO_CAST_FROM_ASCII`.
This commit is contained in:
nerix
2023-10-17 03:50:18 +02:00
committed by GitHub
parent bddc08abd0
commit b975900043
9 changed files with 186 additions and 210 deletions
+3 -1
View File
@@ -24,14 +24,16 @@ public:
static QString findStringFromReaction(const ToastReaction &reaction);
static QString findStringFromReaction(
const pajlada::Settings::Setting<int> &reaction);
static std::map<ToastReaction, QString> reactionToString;
static bool isEnabled();
private:
#ifdef Q_OS_WIN
void ensureInitialized();
void sendWindowsNotification(const QString &channelName,
const QString &channelTitle, Platform p);
bool initialized_ = false;
#endif
};
} // namespace chatterino