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);
|
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)
|
void TwitchChannel::setLive(bool newLiveStatus)
|
||||||
{
|
{
|
||||||
if (this->isLive == newLiveStatus) {
|
if (this->isLive == newLiveStatus) {
|
||||||
|
|
|
@ -22,6 +22,10 @@ public:
|
||||||
bool canSendMessage() const override;
|
bool canSendMessage() const override;
|
||||||
void sendMessage(const QString &message) 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> bttvChannelEmotes;
|
||||||
const std::shared_ptr<chatterino::util::EmoteMap> ffzChannelEmotes;
|
const std::shared_ptr<chatterino::util::EmoteMap> ffzChannelEmotes;
|
||||||
|
|
||||||
|
@ -34,6 +38,7 @@ public:
|
||||||
boost::signals2::signal<void()> onlineStatusChanged;
|
boost::signals2::signal<void()> onlineStatusChanged;
|
||||||
|
|
||||||
pajlada::Signals::NoArgBoltSignal fetchMessages;
|
pajlada::Signals::NoArgBoltSignal fetchMessages;
|
||||||
|
pajlada::Signals::NoArgSignal userStateChanged;
|
||||||
|
|
||||||
QString roomID;
|
QString roomID;
|
||||||
bool isLive;
|
bool isLive;
|
||||||
|
@ -47,6 +52,8 @@ private:
|
||||||
void refreshLiveStatus();
|
void refreshLiveStatus();
|
||||||
|
|
||||||
void fetchRecentMessages();
|
void fetchRecentMessages();
|
||||||
|
|
||||||
|
bool mod;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace twitch
|
} // namespace twitch
|
||||||
|
|
|
@ -120,9 +120,11 @@ void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->highlightState = newHighlightStyle;
|
if (this->highlightState != HighlightState::Highlighted) {
|
||||||
|
this->highlightState = newHighlightStyle;
|
||||||
|
|
||||||
this->update();
|
this->update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect NotebookTab::getDesiredRect() const
|
QRect NotebookTab::getDesiredRect() const
|
||||||
|
|
|
@ -160,6 +160,8 @@ void SplitHeader::updateModerationModeIcon()
|
||||||
this->moderationButton->setPixmap(this->split->getModerationMode()
|
this->moderationButton->setPixmap(this->split->getModerationMode()
|
||||||
? resourceManager.moderationmode_enabled->getPixmap()
|
? resourceManager.moderationmode_enabled->getPixmap()
|
||||||
: resourceManager.moderationmode_disabled->getPixmap());
|
: resourceManager.moderationmode_disabled->getPixmap());
|
||||||
|
|
||||||
|
this->moderationButton->setVisible(this->split->channel->hasModRights());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SplitHeader::paintEvent(QPaintEvent *)
|
void SplitHeader::paintEvent(QPaintEvent *)
|
||||||
|
|
Loading…
Reference in a new issue