Fixes #385, moderator mode icon not showing when broadcaster

This commit is contained in:
fourtf 2018-05-26 17:20:16 +02:00
parent a48a233785
commit 88c609df43
3 changed files with 7 additions and 3 deletions

View file

@ -40,8 +40,8 @@ AccountPopupWidget::AccountPopupWidget(ChannelPtr _channel)
connect(this, &AccountPopupWidget::refreshButtons, this, connect(this, &AccountPopupWidget::refreshButtons, this,
&AccountPopupWidget::actuallyRefreshButtons, Qt::QueuedConnection); &AccountPopupWidget::actuallyRefreshButtons, Qt::QueuedConnection);
app->accounts->Twitch.currentUserChanged.connect([=] { app->accounts->Twitch.currentUserChanged.connect([this] {
auto currentTwitchUser = app->accounts->Twitch.getCurrent(); auto currentTwitchUser = getApp()->accounts->Twitch.getCurrent();
if (!currentTwitchUser) { if (!currentTwitchUser) {
// No twitch user set (should never happen) // No twitch user set (should never happen)
return; return;

View file

@ -94,6 +94,9 @@ SplitHeader::SplitHeader(Split *_split)
this->initializeChannelSignals(); // this->initializeChannelSignals(); //
}); });
this->managedConnect(app->accounts->Twitch.currentUserChanged,
[this] { this->updateModerationModeIcon(); });
this->setMouseTracking(true); this->setMouseTracking(true);
} }

View file

@ -15,6 +15,7 @@
#include <QWidget> #include <QWidget>
#include <pajlada/settings/setting.hpp> #include <pajlada/settings/setting.hpp>
#include <pajlada/signals/connection.hpp> #include <pajlada/signals/connection.hpp>
#include <pajlada/signals/signalholder.hpp>
#include <vector> #include <vector>
@ -23,7 +24,7 @@ namespace widgets {
class Split; class Split;
class SplitHeader : public BaseWidget class SplitHeader : public BaseWidget, pajlada::Signals::SignalHolder
{ {
Q_OBJECT Q_OBJECT