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
+4 -5
View File
@@ -122,9 +122,8 @@ void Paths::initSubDirectories()
// create settings subdirectories and validate that they are created
// properly
auto makePath = [&](const std::string &name) -> QString {
auto path = combinePath(this->rootAppDataDirectory,
QString::fromStdString(name));
auto makePath = [&](const QString &name) -> QString {
auto path = combinePath(this->rootAppDataDirectory, name);
if (!QDir().mkpath(path))
{
@@ -140,11 +139,11 @@ void Paths::initSubDirectories()
this->cacheDirectory_ = makePath("Cache");
this->messageLogDirectory = makePath("Logs");
this->miscDirectory = makePath("Misc");
this->twitchProfileAvatars = makePath("ProfileAvatars");
this->twitchProfileAvatars =
makePath(combinePath("ProfileAvatars", "twitch"));
this->pluginsDirectory = makePath("Plugins");
this->themesDirectory = makePath("Themes");
this->crashdumpDirectory = makePath("Crashes");
//QDir().mkdir(this->twitchProfileAvatars + "/twitch");
}
Paths *getPaths()