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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user