mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
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:
parent
a878ca8062
commit
6732aab323
2 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -48,6 +48,7 @@ private:
|
|||
Label *viewCountLabel = nullptr;
|
||||
Label *followerCountLabel = nullptr;
|
||||
Label *createdDateLabel = nullptr;
|
||||
Label *userIDLabel = nullptr;
|
||||
|
||||
QCheckBox *follow = nullptr;
|
||||
QCheckBox *ignore = nullptr;
|
||||
|
|
Loading…
Reference in a new issue