Load twitch emotes on initialize as well

Fix #581
This commit is contained in:
Rasmus Karlsson 2018-07-07 21:55:09 +02:00
parent 2ea3643100
commit 926a753a54

View file

@ -7,11 +7,13 @@ namespace chatterino {
void Emotes::initialize(Application &app)
{
app.accounts->twitch.currentUserChanged.connect([this, &app] {
const auto refreshTwitchEmotes = [this, &app] {
auto currentUser = app.accounts->twitch.getCurrent();
assert(currentUser);
this->twitch.refresh(currentUser);
});
};
app.accounts->twitch.currentUserChanged.connect(refreshTwitchEmotes);
refreshTwitchEmotes();
this->emojis.load();
this->bttv.loadGlobalEmotes();