fixed crash when moderation buttons are enabled

This commit is contained in:
fourtf
2018-08-12 00:01:37 +02:00
parent b3fd278c3c
commit 1ec1ecd52b
15 changed files with 89 additions and 68 deletions
+9 -6
View File
@@ -1,13 +1,16 @@
#pragma once
#include <boost/optional.hpp>
#include <memory>
#include "boost/optional.hpp"
#include "common/Aliases.hpp"
#include "common/Atomic.hpp"
#include "messages/Emote.hpp"
namespace chatterino {
struct Emote;
using EmotePtr = std::shared_ptr<const Emote>;
class EmoteMap;
class BttvEmotes final
{
static constexpr const char *globalEmoteApiUrl =
@@ -18,9 +21,9 @@ class BttvEmotes final
public:
BttvEmotes();
std::shared_ptr<const EmoteMap> global() const;
boost::optional<EmotePtr> global(const EmoteName &name) const;
void loadGlobal();
std::shared_ptr<const EmoteMap> emotes() const;
boost::optional<EmotePtr> emote(const EmoteName &name) const;
void loadEmotes();
static void loadChannel(const QString &channelName,
std::function<void(EmoteMap &&)> callback);