Remove getPaths() usage from ModerationPage

This commit is contained in:
Rasmus Karlsson 2024-01-15 23:13:49 +01:00
parent 6d0db89856
commit 4993a77b86

View file

@ -54,7 +54,7 @@ QString formatSize(qint64 size)
QString fetchLogDirectorySize()
{
QString logsDirectoryPath = getSettings()->logPath.getValue().isEmpty()
? getPaths()->messageLogDirectory
? getIApp()->getPaths().messageLogDirectory
: getSettings()->logPath;
auto logsSize = dirSize(logsDirectoryPath);
@ -82,7 +82,8 @@ ModerationPage::ModerationPage()
getSettings()->logPath.connect([logsPathLabel](const QString &logPath,
auto) mutable {
QString pathOriginal =
logPath.isEmpty() ? getPaths()->messageLogDirectory : logPath;
logPath.isEmpty() ? getIApp()->getPaths().messageLogDirectory
: logPath;
QString pathShortened =
"Logs are saved at <a href=\"file:///" + pathOriginal +