Show the toggle mod mode button when mod buttons are enabled. (#1518)

* Fix #1288

Show the toggle mod mode button when mod buttons are enabled.

* Automatic formatting ain't good enough i guess.
This commit is contained in:
Mm2PL 2020-01-26 10:10:40 +01:00 committed by pajlada
parent 93a6c55ed3
commit bfee75ec58

View file

@ -577,10 +577,15 @@ void SplitHeader::updateModerationModeIcon()
auto channel = this->split_->getChannel(); auto channel = this->split_->getChannel();
auto twitchChannel = dynamic_cast<TwitchChannel *>(channel.get()); auto twitchChannel = dynamic_cast<TwitchChannel *>(channel.get());
if (twitchChannel != nullptr && twitchChannel->hasModRights()) if (twitchChannel != nullptr &&
(twitchChannel->hasModRights() || moderationMode))
{
this->moderationButton_->show(); this->moderationButton_->show();
}
else else
{
this->moderationButton_->hide(); this->moderationButton_->hide();
}
} }
void SplitHeader::paintEvent(QPaintEvent *) void SplitHeader::paintEvent(QPaintEvent *)