mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
reload working fine with f6, f5 seems to be special
This commit is contained in:
parent
0f44a2e0f4
commit
077e2e089d
|
@ -1,5 +1,6 @@
|
|||
#include "widgets/splits/Split.hpp"
|
||||
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "common/Common.hpp"
|
||||
#include "common/NetworkRequest.hpp"
|
||||
#include "debug/Log.hpp"
|
||||
|
@ -105,6 +106,9 @@ Split::Split(QWidget *parent)
|
|||
// CTRL+F: Search
|
||||
createShortcut(this, "CTRL+F", &Split::showSearch);
|
||||
|
||||
// F5: reload emotes
|
||||
createShortcut(this, "F6", &Split::reloadChannelAndSubscriberEmotes);
|
||||
|
||||
// F12
|
||||
createShortcut(this, "F10", [] {
|
||||
auto *popup = new DebugPopup;
|
||||
|
@ -646,6 +650,16 @@ void Split::showSearch()
|
|||
popup->show();
|
||||
}
|
||||
|
||||
void Split::reloadChannelAndSubscriberEmotes()
|
||||
{
|
||||
getApp()->accounts->twitch.getCurrent()->loadEmotes();
|
||||
auto channel = this->getChannel();
|
||||
|
||||
if (auto twitchChannel = dynamic_cast<TwitchChannel *>(channel.get()))
|
||||
twitchChannel->refreshChannelEmotes();
|
||||
}
|
||||
|
||||
|
||||
template <typename Iter, typename RandomGenerator>
|
||||
static Iter select_randomly(Iter start, Iter end, RandomGenerator &g)
|
||||
{
|
||||
|
|
|
@ -130,6 +130,7 @@ public slots:
|
|||
void copyToClipboard();
|
||||
void showSearch();
|
||||
void showViewerList();
|
||||
void reloadChannelAndSubscriberEmotes();
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
Loading…
Reference in a new issue