mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Added tooltip to original link too.
This commit is contained in:
parent
f4828b7d09
commit
c7e2188582
|
@ -269,17 +269,18 @@ void TwitchMessageBuilder::addTextOrEmoji(const QString &string_)
|
||||||
link = Link(Link::Url, linkString);
|
link = Link(Link::Url, linkString);
|
||||||
|
|
||||||
textColor = MessageColor(MessageColor::Link);
|
textColor = MessageColor(MessageColor::Link);
|
||||||
auto linkMessageElement = this->emplace<TextElement>(lowercaseLinkString,
|
auto linkMELowercase = this->emplace<TextElement>(lowercaseLinkString,
|
||||||
MessageElementFlag::LowercaseLink, textColor)
|
MessageElementFlag::LowercaseLink, textColor)
|
||||||
->setLink(link);
|
->setLink(link);
|
||||||
this->emplace<TextElement>(string, MessageElementFlag::OriginalLink,
|
auto linkMEOriginal = this->emplace<TextElement>(string,
|
||||||
textColor)
|
MessageElementFlag::OriginalLink, textColor)
|
||||||
->setLink(link);
|
->setLink(link);
|
||||||
|
|
||||||
LinkResolver::getLinkInfo(
|
LinkResolver::getLinkInfo(
|
||||||
linkString, [linkMessageElement](QString tooltipText) {
|
linkString, [linkMELowercase, linkMEOriginal](QString tooltipText) {
|
||||||
if (!tooltipText.isEmpty()) {
|
if (!tooltipText.isEmpty()) {
|
||||||
linkMessageElement->setTooltip(tooltipText);
|
linkMELowercase->setTooltip(tooltipText);
|
||||||
|
linkMEOriginal->setTooltip(tooltipText);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue