Set displayName to UserInfo link as value. (#675)

This commit is contained in:
23rd 2018-08-22 16:16:19 +03:00 committed by pajlada
parent be4b3f1a38
commit 8a1c30408a
2 changed files with 3 additions and 3 deletions

View file

@ -438,7 +438,7 @@ void TwitchMessageBuilder::appendUsername()
this->emplace<TextElement>(usernameText, MessageElementFlag::Username,
this->usernameColor_,
FontStyle::ChatMediumBold)
->setLink({Link::UserInfo, this->userName});
->setLink({Link::UserInfo, this->message().displayName});
auto currentUser = app->accounts->twitch.getCurrent();
@ -464,7 +464,7 @@ void TwitchMessageBuilder::appendUsername()
this->emplace<TextElement>(usernameText, MessageElementFlag::Username,
this->usernameColor_,
FontStyle::ChatMediumBold)
->setLink({Link::UserInfo, this->userName});
->setLink({Link::UserInfo, this->message().displayName});
}
}

View file

@ -52,7 +52,7 @@ UserInfoPopup::UserInfoPopup()
avatar->setScaleIndependantSize(100, 100);
QObject::connect(avatar.getElement(), &Button::clicked, [this] {
QDesktopServices::openUrl(
QUrl("https://twitch.tv/" + this->userName_));
QUrl("https://twitch.tv/" + this->userName_.toLower()));
});
// items on the right