mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fix for bur0k
This commit is contained in:
parent
b3951262c8
commit
7310f1b888
|
@ -83,6 +83,22 @@ void TwitchChannel::sendMessage(const QString &message)
|
|||
singletons::IrcManager::getInstance().sendMessage(this->name, parsedMessage);
|
||||
}
|
||||
|
||||
bool TwitchChannel::isMod()
|
||||
{
|
||||
return this->mod;
|
||||
}
|
||||
|
||||
bool TwitchChannel::isBroadcaster()
|
||||
{
|
||||
return this->name == singletons::AccountManager::getInstance().Twitch.getCurrent()->getUserId();
|
||||
}
|
||||
|
||||
bool TwitchChannel::hasModRights()
|
||||
{
|
||||
// fourtf: check if staff
|
||||
return this->isMod() || this->isBroadcaster();
|
||||
}
|
||||
|
||||
void TwitchChannel::setLive(bool newLiveStatus)
|
||||
{
|
||||
if (this->isLive == newLiveStatus) {
|
||||
|
|
|
@ -22,6 +22,10 @@ public:
|
|||
bool canSendMessage() const override;
|
||||
void sendMessage(const QString &message) override;
|
||||
|
||||
bool isMod();
|
||||
bool isBroadcaster();
|
||||
bool hasModRights();
|
||||
|
||||
const std::shared_ptr<chatterino::util::EmoteMap> bttvChannelEmotes;
|
||||
const std::shared_ptr<chatterino::util::EmoteMap> ffzChannelEmotes;
|
||||
|
||||
|
@ -34,6 +38,7 @@ public:
|
|||
boost::signals2::signal<void()> onlineStatusChanged;
|
||||
|
||||
pajlada::Signals::NoArgBoltSignal fetchMessages;
|
||||
pajlada::Signals::NoArgSignal userStateChanged;
|
||||
|
||||
QString roomID;
|
||||
bool isLive;
|
||||
|
@ -47,6 +52,8 @@ private:
|
|||
void refreshLiveStatus();
|
||||
|
||||
void fetchRecentMessages();
|
||||
|
||||
bool mod;
|
||||
};
|
||||
|
||||
} // namespace twitch
|
||||
|
|
|
@ -120,10 +120,12 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
|
|||
return;
|
||||
}
|
||||
|
||||
if (this->highlightState != HighlightState::Highlighted) {
|
||||
this->highlightState = newHighlightStyle;
|
||||
|
||||
this->update();
|
||||
}
|
||||
}
|
||||
|
||||
QRect NotebookTab::getDesiredRect() const
|
||||
{
|
||||
|
|
|
@ -160,6 +160,8 @@ void SplitHeader::updateModerationModeIcon()
|
|||
this->moderationButton->setPixmap(this->split->getModerationMode()
|
||||
? resourceManager.moderationmode_enabled->getPixmap()
|
||||
: resourceManager.moderationmode_disabled->getPixmap());
|
||||
|
||||
this->moderationButton->setVisible(this->split->channel->hasModRights());
|
||||
}
|
||||
|
||||
void SplitHeader::paintEvent(QPaintEvent *)
|
||||
|
|
Loading…
Reference in a new issue