Add user IDs to user cards (#1247)
* Add user ids to user cards and a setting to the misc section of the settings * Fix letter casing * Forgot to run clang-format, now it's fixed * Fix crash in UserInfoPopup::updateUserData() * Removed setting as per Apa420's and fourtf's advice * Removed remnants of the setting
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#define TEXT_FOLLOWERS "Followers: "
|
||||
#define TEXT_VIEWS "Views: "
|
||||
#define TEXT_CREATED "Created: "
|
||||
#define TEXT_USER_ID "User ID: "
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -84,6 +85,7 @@ UserInfoPopup::UserInfoPopup()
|
||||
.assign(&this->ui_.followerCountLabel);
|
||||
vbox.emplace<Label>(TEXT_CREATED)
|
||||
.assign(&this->ui_.createdDateLabel);
|
||||
vbox.emplace<Label>(TEXT_USER_ID).assign(&this->ui_.userIDLabel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,6 +366,10 @@ void UserInfoPopup::updateUserData()
|
||||
|
||||
this->userId_ = id;
|
||||
|
||||
this->ui_.userIDLabel->setText(TEXT_USER_ID + this->userId_);
|
||||
// don't wait for the request to complete, just put the user id in the card
|
||||
// right away
|
||||
|
||||
QString url("https://api.twitch.tv/kraken/channels/" + id);
|
||||
|
||||
NetworkRequest::twitchRequest(url)
|
||||
|
||||
Reference in New Issue
Block a user