51f2c4d1c0
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
38 lines
912 B
C++
38 lines
912 B
C++
#pragma once
|
|
|
|
#include "common/Aliases.hpp"
|
|
#include "common/Atomic.hpp"
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include <memory>
|
|
|
|
namespace chatterino {
|
|
|
|
struct Emote;
|
|
using EmotePtr = std::shared_ptr<const Emote>;
|
|
class EmoteMap;
|
|
class Channel;
|
|
|
|
class FfzEmotes final
|
|
{
|
|
public:
|
|
FfzEmotes();
|
|
|
|
std::shared_ptr<const EmoteMap> emotes() const;
|
|
boost::optional<EmotePtr> emote(const EmoteName &name) const;
|
|
void loadEmotes();
|
|
void setEmotes(std::shared_ptr<const EmoteMap> emotes);
|
|
static void loadChannel(
|
|
std::weak_ptr<Channel> channel, const QString &channelId,
|
|
std::function<void(EmoteMap &&)> emoteCallback,
|
|
std::function<void(boost::optional<EmotePtr>)> modBadgeCallback,
|
|
std::function<void(boost::optional<EmotePtr>)> vipBadgeCallback,
|
|
bool manualRefresh);
|
|
|
|
private:
|
|
Atomic<std::shared_ptr<const EmoteMap>> global_;
|
|
};
|
|
|
|
} // namespace chatterino
|