Show visual feedback when BTTV and FFZ emotes are loaded (#1671)
Upon joining a channel or pressing F5, BTTV and FFZ emotes are (re)loaded. This change adds visual feedback of the network requests and their outcome, in the form of a system message in the associated channel's chat window. Non-error messages are suppressed when joining a channel (which automatically loads emotes).
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "boost/optional.hpp"
|
||||
#include "common/Aliases.hpp"
|
||||
#include "common/Atomic.hpp"
|
||||
#include "providers/twitch/TwitchChannel.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -24,8 +25,10 @@ public:
|
||||
std::shared_ptr<const EmoteMap> emotes() const;
|
||||
boost::optional<EmotePtr> emote(const EmoteName &name) const;
|
||||
void loadEmotes();
|
||||
static void loadChannel(const QString &channelId,
|
||||
std::function<void(EmoteMap &&)> callback);
|
||||
static void loadChannel(std::weak_ptr<Channel> channel,
|
||||
const QString &channelId,
|
||||
std::function<void(EmoteMap &&)> callback,
|
||||
bool manualRefresh);
|
||||
|
||||
private:
|
||||
Atomic<std::shared_ptr<const EmoteMap>> global_;
|
||||
|
||||
Reference in New Issue
Block a user