refactor: some Application & style things (#5561)
This commit is contained in:
@@ -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,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/Aliases.hpp"
|
||||
#include "util/QStringHash.hpp"
|
||||
#include "util/ThreadGuard.hpp"
|
||||
|
||||
#include <QColor>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "providers/ffz/FfzUtil.hpp"
|
||||
|
||||
#include <QUrl>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
Url parseFfzUrl(const QString &ffzUrl)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "common/Aliases.hpp"
|
||||
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user