Fix crash when displaying a highlight inside of a sub message with sub message highlights turned off (#3556)

This commit is contained in:
LosFarmosCTL 2022-02-12 02:57:33 -08:00 committed by GitHub
parent 5490ff5015
commit 092f66dc15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -95,6 +95,7 @@
- Bugfix: Usercards no longer close when the originating window (e.g. a search popup) is closed. (#3518)
- Bugfix: Disabled /popout and /streamlink from working in non-twitch channels (e.g. /whispers) when supplied no arguments. (#3541)
- Bugfix: Fixed automod and unban messages showing when moderation actions were disabled (#3548)
- Bugfix: Fixed crash when rendering a highlight inside of a sub message, with sub message highlights themselves turned off. (#3556)
- Dev: Batch checking live status for channels with live notifications that aren't connected. (#3442)
- Dev: Add GitHub action to test builds without precompiled headers enabled. (#3327)
- Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103)

View file

@ -217,7 +217,8 @@ void SharedMessageBuilder::parseHighlights()
<< "sent a message";
this->message().flags.set(MessageFlag::Highlighted);
if (!this->message().flags.has(MessageFlag::Subscription))
if (!(this->message().flags.has(MessageFlag::Subscription) &&
getSettings()->enableSubHighlight))
{
this->message().highlightColor = userHighlight.getColor();
}
@ -289,7 +290,8 @@ void SharedMessageBuilder::parseHighlights()
}
this->message().flags.set(MessageFlag::Highlighted);
if (!this->message().flags.has(MessageFlag::Subscription))
if (!(this->message().flags.has(MessageFlag::Subscription) &&
getSettings()->enableSubHighlight))
{
this->message().highlightColor = highlight.getColor();
}
@ -347,7 +349,8 @@ void SharedMessageBuilder::parseHighlights()
if (!badgeHighlightSet)
{
this->message().flags.set(MessageFlag::Highlighted);
if (!this->message().flags.has(MessageFlag::Subscription))
if (!(this->message().flags.has(MessageFlag::Subscription) &&
getSettings()->enableSubHighlight))
{
this->message().highlightColor = highlight.getColor();
}