From 8a1c30408a63c787f943b95e6b55ba24fed7c251 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 22 Aug 2018 16:16:19 +0300 Subject: [PATCH] Set displayName to UserInfo link as value. (#675) --- src/providers/twitch/TwitchMessageBuilder.cpp | 4 ++-- src/widgets/dialogs/UserInfoPopup.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index ca04e7e86..b245c7664 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -438,7 +438,7 @@ void TwitchMessageBuilder::appendUsername() this->emplace(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(usernameText, MessageElementFlag::Username, this->usernameColor_, FontStyle::ChatMediumBold) - ->setLink({Link::UserInfo, this->userName}); + ->setLink({Link::UserInfo, this->message().displayName}); } } diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index e7d3681ea..2b7f37f4a 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -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