From 88c609df43a9f2bc4ad247263d048d7a6f9615ed Mon Sep 17 00:00:00 2001 From: fourtf Date: Sat, 26 May 2018 17:20:16 +0200 Subject: [PATCH] Fixes #385, moderator mode icon not showing when broadcaster --- src/widgets/accountpopup.cpp | 4 ++-- src/widgets/helper/splitheader.cpp | 3 +++ src/widgets/helper/splitheader.hpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/widgets/accountpopup.cpp b/src/widgets/accountpopup.cpp index 847343f68..fb189c061 100644 --- a/src/widgets/accountpopup.cpp +++ b/src/widgets/accountpopup.cpp @@ -40,8 +40,8 @@ AccountPopupWidget::AccountPopupWidget(ChannelPtr _channel) connect(this, &AccountPopupWidget::refreshButtons, this, &AccountPopupWidget::actuallyRefreshButtons, Qt::QueuedConnection); - app->accounts->Twitch.currentUserChanged.connect([=] { - auto currentTwitchUser = app->accounts->Twitch.getCurrent(); + app->accounts->Twitch.currentUserChanged.connect([this] { + auto currentTwitchUser = getApp()->accounts->Twitch.getCurrent(); if (!currentTwitchUser) { // No twitch user set (should never happen) return; diff --git a/src/widgets/helper/splitheader.cpp b/src/widgets/helper/splitheader.cpp index 150e15e85..702c7ff7f 100644 --- a/src/widgets/helper/splitheader.cpp +++ b/src/widgets/helper/splitheader.cpp @@ -94,6 +94,9 @@ SplitHeader::SplitHeader(Split *_split) this->initializeChannelSignals(); // }); + this->managedConnect(app->accounts->Twitch.currentUserChanged, + [this] { this->updateModerationModeIcon(); }); + this->setMouseTracking(true); } diff --git a/src/widgets/helper/splitheader.hpp b/src/widgets/helper/splitheader.hpp index 9e844316e..816ac70b1 100644 --- a/src/widgets/helper/splitheader.hpp +++ b/src/widgets/helper/splitheader.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -23,7 +24,7 @@ namespace widgets { class Split; -class SplitHeader : public BaseWidget +class SplitHeader : public BaseWidget, pajlada::Signals::SignalHolder { Q_OBJECT