2018-08-02 14:23:27 +02:00
|
|
|
#pragma once
|
|
|
|
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include "common/Aliases.hpp"
|
2022-12-31 15:41:01 +01:00
|
|
|
#include "common/Singleton.hpp"
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include "util/QStringHash.hpp"
|
|
|
|
|
2021-05-23 23:10:29 +02:00
|
|
|
#include <memory>
|
2023-10-08 18:50:48 +02:00
|
|
|
#include <optional>
|
2021-05-01 13:38:58 +02:00
|
|
|
#include <shared_mutex>
|
|
|
|
#include <unordered_map>
|
2018-09-16 17:27:51 +02:00
|
|
|
#include <vector>
|
|
|
|
|
2018-08-02 14:23:27 +02:00
|
|
|
namespace chatterino {
|
|
|
|
|
2018-08-11 22:23:06 +02:00
|
|
|
struct Emote;
|
|
|
|
using EmotePtr = std::shared_ptr<const Emote>;
|
|
|
|
|
2018-09-16 17:27:51 +02:00
|
|
|
class ChatterinoBadges : public Singleton
|
2018-08-02 14:23:27 +02:00
|
|
|
{
|
|
|
|
public:
|
2023-10-25 18:13:48 +02:00
|
|
|
void initialize(Settings &settings, Paths &paths) override;
|
2018-08-02 14:23:27 +02:00
|
|
|
ChatterinoBadges();
|
|
|
|
|
2023-10-08 18:50:48 +02:00
|
|
|
std::optional<EmotePtr> getBadge(const UserId &id);
|
2018-08-02 14:23:27 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void loadChatterinoBadges();
|
2021-05-01 13:38:58 +02:00
|
|
|
|
|
|
|
std::shared_mutex mutex_;
|
|
|
|
|
|
|
|
std::unordered_map<QString, int> badgeMap;
|
2018-09-16 17:27:51 +02:00
|
|
|
std::vector<EmotePtr> emotes;
|
2018-08-02 14:23:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|