@@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user