Compare commits

..

3 commits

Author SHA1 Message Date
Rasmus Karlsson d46b553c53 Don't use getIApp()->getPaths() in Theme 2024-01-16 21:30:36 +01:00
Rasmus Karlsson 78c028d4e0 Remove explicit CrashHandler template param
No longer necessary since we call new CrashHandler
2024-01-16 21:11:40 +01:00
Rasmus Karlsson 44503d2e63 fix changelog entry number 2024-01-16 13:58:40 +01:00
4 changed files with 6 additions and 6 deletions

View file

@ -117,7 +117,7 @@
- Dev: Channels without any animated elements on screen will skip updates from the GIF timer. (#5042, #5043, #5045) - Dev: Channels without any animated elements on screen will skip updates from the GIF timer. (#5042, #5043, #5045)
- Dev: Autogenerate docs/plugin-meta.lua. (#5055) - Dev: Autogenerate docs/plugin-meta.lua. (#5055)
- Dev: Refactor `NetworkPrivate`. (#5063) - Dev: Refactor `NetworkPrivate`. (#5063)
- Dev: Refactor `Paths` & `Updates`, focusing on reducing their singletoniability. (#5093) - Dev: Refactor `Paths` & `Updates`, focusing on reducing their singletoniability. (#5092)
- Dev: Removed duplicate scale in settings dialog. (#5069) - Dev: Removed duplicate scale in settings dialog. (#5069)
- Dev: Fix `NotebookTab` emitting updates for every message. (#5068) - Dev: Fix `NotebookTab` emitting updates for every message. (#5068)
- Dev: Added benchmark for parsing and building recent messages. (#5071) - Dev: Added benchmark for parsing and building recent messages. (#5071)

View file

@ -120,7 +120,7 @@ Application::Application(Settings &_settings, const Paths &paths,
, toasts(&this->emplace<Toasts>()) , toasts(&this->emplace<Toasts>())
, imageUploader(&this->emplace<ImageUploader>()) , imageUploader(&this->emplace<ImageUploader>())
, seventvAPI(&this->emplace<SeventvAPI>()) , seventvAPI(&this->emplace<SeventvAPI>())
, crashHandler(&this->emplace<CrashHandler>(new CrashHandler(paths))) , crashHandler(&this->emplace(new CrashHandler(paths)))
, commands(&this->emplace<CommandController>()) , commands(&this->emplace<CommandController>())
, notifications(&this->emplace<NotificationController>()) , notifications(&this->emplace<NotificationController>())

View file

@ -228,7 +228,7 @@ void Theme::initialize(Settings &settings, const Paths &paths)
}, },
false); false);
this->loadAvailableThemes(); this->loadAvailableThemes(paths);
this->update(); this->update();
} }
@ -328,11 +328,11 @@ std::vector<std::pair<QString, QVariant>> Theme::availableThemes() const
return packagedThemes; return packagedThemes;
} }
void Theme::loadAvailableThemes() void Theme::loadAvailableThemes(const Paths &paths)
{ {
this->availableThemes_ = Theme::builtInThemes; this->availableThemes_ = Theme::builtInThemes;
auto dir = QDir(getIApp()->getPaths().themesDirectory); auto dir = QDir(paths.themesDirectory);
for (const auto &info : for (const auto &info :
dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name)) dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
{ {

View file

@ -169,7 +169,7 @@ private:
* *
* NOTE: This is currently not built to be reloadable * NOTE: This is currently not built to be reloadable
**/ **/
void loadAvailableThemes(); void loadAvailableThemes(const Paths &paths);
std::optional<ThemeDescriptor> findThemeByKey(const QString &key); std::optional<ThemeDescriptor> findThemeByKey(const QString &key);