chore: replace usages of obsolete twitch struct with backing field (#3614)

Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
This commit is contained in:
James Upjohn
2022-03-20 00:02:29 +13:00
committed by GitHub
parent 4c275cb183
commit 67c10fafc7
23 changed files with 120 additions and 142 deletions
+4 -5
View File
@@ -1016,15 +1016,15 @@ MessageElementFlags ChannelView::getFlags() const
{
flags.set(MessageElementFlag::ModeratorTools);
}
if (this->underlyingChannel_ == app->twitch.server->mentionsChannel ||
this->underlyingChannel_ == app->twitch.server->liveChannel)
if (this->underlyingChannel_ == app->twitch->mentionsChannel ||
this->underlyingChannel_ == app->twitch->liveChannel)
{
flags.set(MessageElementFlag::ChannelName);
flags.unset(MessageElementFlag::ChannelPointReward);
}
}
if (this->sourceChannel_ == app->twitch.server->mentionsChannel)
if (this->sourceChannel_ == app->twitch->mentionsChannel)
flags.set(MessageElementFlag::ChannelName);
return flags;
@@ -1071,8 +1071,7 @@ void ChannelView::drawMessages(QPainter &painter)
bool windowFocused = this->window() == QApplication::activeWindow();
auto app = getApp();
bool isMentions =
this->underlyingChannel_ == app->twitch.server->mentionsChannel;
bool isMentions = this->underlyingChannel_ == app->twitch->mentionsChannel;
for (size_t i = start; i < messagesSnapshot.size(); ++i)
{