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 =
|
TwitchChannel *twitchChannel =
|
||||||
dynamic_cast<TwitchChannel *>(this->channel_.get());
|
dynamic_cast<TwitchChannel *>(this->channel_.get());
|
||||||
|
|
||||||
bool visibilityMod = false;
|
bool visibilityModButtons = false;
|
||||||
bool visibilityUnmod = false;
|
|
||||||
|
|
||||||
if (twitchChannel)
|
if (twitchChannel)
|
||||||
{
|
{
|
||||||
|
@ -162,12 +161,11 @@ UserInfoPopup::UserInfoPopup()
|
||||||
getApp()->accounts->twitch.getCurrent()->getUserName(),
|
getApp()->accounts->twitch.getCurrent()->getUserName(),
|
||||||
this->userName_, Qt::CaseInsensitive) == 0;
|
this->userName_, Qt::CaseInsensitive) == 0;
|
||||||
|
|
||||||
visibilityMod = twitchChannel->isBroadcaster() && !isMyself;
|
visibilityModButtons =
|
||||||
visibilityUnmod =
|
twitchChannel->isBroadcaster() && !isMyself;
|
||||||
visibilityMod || (twitchChannel->isMod() && isMyself);
|
|
||||||
}
|
}
|
||||||
mod->setVisible(visibilityMod);
|
mod->setVisible(visibilityModButtons);
|
||||||
unmod->setVisible(visibilityUnmod);
|
unmod->setVisible(visibilityModButtons);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue