mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Show picked outcome in prediction badges. (#3357)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
f58f35292a
commit
56f2207d22
2 changed files with 17 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
||||||
- Minor: IRC now parses/displays links like Twitch chat. (#3334)
|
- Minor: IRC now parses/displays links like Twitch chat. (#3334)
|
||||||
- Minor: Added button & label for copying login name of user instead of display name in the user info popout. (#3335)
|
- Minor: Added button & label for copying login name of user instead of display name in the user info popout. (#3335)
|
||||||
- Minor: Make `/delete` errors a bit more verbose (#3350)
|
- Minor: Make `/delete` errors a bit more verbose (#3350)
|
||||||
|
- Minor: Show picked outcome in prediction badges. (#3357)
|
||||||
- Minor: Add support for Emoji in IRC (#3354)
|
- Minor: Add support for Emoji in IRC (#3354)
|
||||||
- Bugfix: Fixed colored usernames sometimes not working. (#3170)
|
- Bugfix: Fixed colored usernames sometimes not working. (#3170)
|
||||||
- Bugfix: Restored ability to send duplicate `/me` messages. (#3166)
|
- Bugfix: Restored ability to send duplicate `/me` messages. (#3166)
|
||||||
|
|
|
@ -1101,6 +1101,22 @@ void TwitchMessageBuilder::appendTwitchBadges()
|
||||||
.arg(subMonths);
|
.arg(subMonths);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (badge.flag_ == MessageElementFlag::BadgePredictions)
|
||||||
|
{
|
||||||
|
auto badgeInfoIt = badgeInfos.find(badge.key_);
|
||||||
|
if (badgeInfoIt != badgeInfos.end())
|
||||||
|
{
|
||||||
|
auto predictionText =
|
||||||
|
badgeInfoIt->second
|
||||||
|
.replace("\\s", " ") // standard IRC escapes
|
||||||
|
.replace("\\:", ";")
|
||||||
|
.replace("\\\\", "\\")
|
||||||
|
.replace("⸝", ","); // twitch's comma escape
|
||||||
|
// Careful, the first character is RIGHT LOW PARAPHRASE BRACKET or U+2E1D, which just looks like a comma
|
||||||
|
|
||||||
|
tooltip = QString("Predicted %1").arg(predictionText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this->emplace<BadgeElement>(badgeEmote.get(), badge.flag_)
|
this->emplace<BadgeElement>(badgeEmote.get(), badge.flag_)
|
||||||
->setTooltip(tooltip);
|
->setTooltip(tooltip);
|
||||||
|
|
Loading…
Reference in a new issue