mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
parent
58e909067e
commit
62cf7cbea2
1 changed files with 5 additions and 7 deletions
|
@ -150,8 +150,7 @@ UserInfoPopup::UserInfoPopup()
|
|||
TwitchChannel *twitchChannel =
|
||||
dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||
|
||||
bool visibilityMod = false;
|
||||
bool visibilityUnmod = false;
|
||||
bool visibilityModButtons = false;
|
||||
|
||||
if (twitchChannel)
|
||||
{
|
||||
|
@ -162,12 +161,11 @@ UserInfoPopup::UserInfoPopup()
|
|||
getApp()->accounts->twitch.getCurrent()->getUserName(),
|
||||
this->userName_, Qt::CaseInsensitive) == 0;
|
||||
|
||||
visibilityMod = twitchChannel->isBroadcaster() && !isMyself;
|
||||
visibilityUnmod =
|
||||
visibilityMod || (twitchChannel->isMod() && isMyself);
|
||||
visibilityModButtons =
|
||||
twitchChannel->isBroadcaster() && !isMyself;
|
||||
}
|
||||
mod->setVisible(visibilityMod);
|
||||
unmod->setVisible(visibilityUnmod);
|
||||
mod->setVisible(visibilityModButtons);
|
||||
unmod->setVisible(visibilityModButtons);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue