Migrated Kraken's getUser to Helix (#2260)

This commit is contained in:
Paweł
2020-12-06 19:41:52 +01:00
committed by GitHub
parent 277ef4b2e3
commit cfa9e5903e
6 changed files with 9 additions and 61 deletions
+5 -16
View File
@@ -580,25 +580,14 @@ void UserInfoPopup::updateUserData()
this->userId_ = user.id;
this->ui_.nameLabel->setText(user.displayName);
this->setWindowTitle(TEXT_TITLE.arg(user.displayName));
this->ui_.viewCountLabel->setText(TEXT_VIEWS.arg(user.viewCount));
this->ui_.createdDateLabel->setText(
TEXT_CREATED.arg(user.createdAt.section("T", 0, 0)));
this->ui_.userIDLabel->setText(TEXT_USER_ID + user.id);
this->ui_.userIDLabel->setProperty("copy-text", user.id);
this->ui_.viewCountLabel->setText(TEXT_VIEWS.arg(user.viewCount));
getKraken()->getUser(
user.id,
[this, hack](const auto &user) {
if (!hack.lock())
{
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)));
},
[] {
// failure
});
if (isInStreamerMode() &&
getSettings()->streamerModeHideUsercardAvatars)
{