Ensure Twitch username in UserCard uses display name from API (#2160)

This commit is contained in:
Paweł 2020-11-08 11:39:10 +01:00 committed by GitHub
parent 29d0ef6923
commit fbd5df53d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View file

@ -2,6 +2,7 @@
## Unversioned
- Minor: Made usercard update user's display name (#2160)
- Minor: Added placeholder text for message text input box. (#2143, #2149)
- Minor: Added support for FrankerFaceZ badges. (#2101, part of #1658)
- Minor: Added a navigation list to the settings and reordered them.

View file

@ -25,9 +25,11 @@ struct KrakenChannel {
struct KrakenUser {
const QString createdAt;
const QString displayName;
KrakenUser(QJsonObject jsonObject)
: createdAt(jsonObject.value("created_at").toString())
, displayName(jsonObject.value("display_name").toString())
{
}
};

View file

@ -586,6 +586,8 @@ void UserInfoPopup::updateUserData()
{
return;
}
this->ui_.nameLabel->setText(user.displayName);
this->setWindowTitle(TEXT_TITLE.arg(user.displayName));
this->ui_.createdDateLabel->setText(
TEXT_CREATED.arg(user.createdAt.section("T", 0, 0)));
},