reload working fine with f6, f5 seems to be special
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user