refactor: some Application & style things (#5561)

This commit is contained in:
pajlada
2024-08-25 15:33:07 +02:00
committed by GitHub
parent ac88730563
commit 627c735524
41 changed files with 733 additions and 678 deletions
-3
View File
@@ -12,9 +12,6 @@
#include <QThread>
#include <QUrl>
#include <map>
#include <shared_mutex>
namespace chatterino {
std::vector<FfzBadges::Badge> FfzBadges::getUserBadges(const UserId &id)
-1
View File
@@ -1,7 +1,6 @@
#pragma once
#include "common/Aliases.hpp"
#include "util/QStringHash.hpp"
#include "util/ThreadGuard.hpp"
#include <QColor>
+5
View File
@@ -206,6 +206,11 @@ FfzChannelBadgeMap ffz::detail::parseChannelBadges(const QJsonObject &badgeRoot)
FfzEmotes::FfzEmotes()
: global_(std::make_shared<EmoteMap>())
{
getSettings()->enableFFZGlobalEmotes.connect(
[this] {
this->loadEmotes();
},
this->managedConnections, false);
}
std::shared_ptr<const EmoteMap> FfzEmotes::emotes() const
+7
View File
@@ -5,10 +5,14 @@
#include "util/QStringHash.hpp"
#include <boost/unordered/unordered_flat_map.hpp>
#include <pajlada/signals/scoped-connection.hpp>
#include <QJsonObject>
#include <QString>
#include <functional>
#include <memory>
#include <optional>
#include <vector>
namespace chatterino {
@@ -51,6 +55,9 @@ public:
private:
Atomic<std::shared_ptr<const EmoteMap>> global_;
std::vector<std::unique_ptr<pajlada::Signals::ScopedConnection>>
managedConnections;
};
} // namespace chatterino
+2
View File
@@ -1,5 +1,7 @@
#include "providers/ffz/FfzUtil.hpp"
#include <QUrl>
namespace chatterino {
Url parseFfzUrl(const QString &ffzUrl)
-1
View File
@@ -3,7 +3,6 @@
#include "common/Aliases.hpp"
#include <QString>
#include <QUrl>
namespace chatterino {