From c7e21885822d8e0d23f4ee9635e823e9b62e28a7 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 25 Aug 2018 21:47:25 +0300 Subject: [PATCH] Added tooltip to original link too. --- src/providers/twitch/TwitchMessageBuilder.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index d19d3252c..042830432 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -269,17 +269,18 @@ void TwitchMessageBuilder::addTextOrEmoji(const QString &string_) link = Link(Link::Url, linkString); textColor = MessageColor(MessageColor::Link); - auto linkMessageElement = this->emplace(lowercaseLinkString, + auto linkMELowercase = this->emplace(lowercaseLinkString, MessageElementFlag::LowercaseLink, textColor) ->setLink(link); - this->emplace(string, MessageElementFlag::OriginalLink, - textColor) + auto linkMEOriginal = this->emplace(string, + MessageElementFlag::OriginalLink, textColor) ->setLink(link); LinkResolver::getLinkInfo( - linkString, [linkMessageElement](QString tooltipText) { + linkString, [linkMELowercase, linkMEOriginal](QString tooltipText) { if (!tooltipText.isEmpty()) { - linkMessageElement->setTooltip(tooltipText); + linkMELowercase->setTooltip(tooltipText); + linkMEOriginal->setTooltip(tooltipText); } }); }