Hide chatter list button for non-moderators (#5245)

This commit is contained in:
pajlada
2024-03-10 12:46:26 +01:00
committed by GitHub
parent 9d02fa14ed
commit a958619860
5 changed files with 63 additions and 44 deletions
+4 -13
View File
@@ -331,7 +331,7 @@ Split::Split(QWidget *parent)
},
this->signalHolder_);
this->header_->updateModerationModeIcon();
this->header_->updateIcons();
this->overlay_->hide();
this->setSizePolicy(QSizePolicy::MinimumExpanding,
@@ -813,7 +813,7 @@ void Split::joinChannelInNewTab(ChannelPtr channel)
void Split::refreshModerationMode()
{
this->header_->updateModerationModeIcon();
this->header_->updateIcons();
this->view_->queueLayout();
}
@@ -865,7 +865,7 @@ void Split::setChannel(IndirectChannel newChannel)
if (tc != nullptr)
{
this->usermodeChangedConnection_ = tc->userStateChanged.connect([this] {
this->header_->updateModerationModeIcon();
this->header_->updateIcons();
this->header_->updateRoomModes();
});
@@ -881,19 +881,10 @@ void Split::setChannel(IndirectChannel newChannel)
});
});
this->header_->updateModerationModeIcon();
this->header_->updateIcons();
this->header_->updateChannelText();
this->header_->updateRoomModes();
if (newChannel.getType() == Channel::Type::Twitch)
{
this->header_->setChattersButtonVisible(true);
}
else
{
this->header_->setChattersButtonVisible(false);
}
this->channelSignalHolder_.managedConnect(
this->channel_.get()->displayNameChanged, [this] {
this->actionRequested.invoke(Action::RefreshTab);