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);
|
||||
|
||||
textColor = MessageColor(MessageColor::Link);
|
||||
auto linkMessageElement = this->emplace<TextElement>(lowercaseLinkString,
|
||||
auto linkMELowercase = this->emplace<TextElement>(lowercaseLinkString,
|
||||
MessageElementFlag::LowercaseLink, textColor)
|
||||
->setLink(link);
|
||||
this->emplace<TextElement>(string, MessageElementFlag::OriginalLink,
|
||||
textColor)
|
||||
auto linkMEOriginal = this->emplace<TextElement>(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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue