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