Skip to content

Commit

Permalink
Removed total views from the usercard (Chatterino#3792)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmattbtw authored Jun 5, 2022
1 parent 7ccf601 commit d29243a
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Minor: Added `/requests` command. Usage: `/requests [channel]`. Opens the channel points requests queue for the provided channel or the current channel if no input is provided. (#3746)
- Minor: Added ability to execute commands on chat messages using the message context menu. (#3738, #3765)
- Minor: Added `/copy` command. Usage: `/copy <text>`. Copies provided text to clipboard - can be useful with custom commands. (#3763)
- Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792)
- Bugfix: Fixed viewers list search not working when used before loading finishes. (#3774)
- Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646)
- Bugfix: Fixed live notifications not getting updated for closed streams going offline. (#3678)
Expand Down
2 changes: 0 additions & 2 deletions src/providers/twitch/api/Helix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ struct HelixUser {
QString createdAt;
QString description;
QString profileImageUrl;
int viewCount;

explicit HelixUser(QJsonObject jsonObject)
: id(jsonObject.value("id").toString())
Expand All @@ -36,7 +35,6 @@ struct HelixUser {
, createdAt(jsonObject.value("created_at").toString())
, description(jsonObject.value("description").toString())
, profileImageUrl(jsonObject.value("profile_image_url").toString())
, viewCount(jsonObject.value("view_count").toInt())
{
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ URL: https://dev.twitch.tv/docs/api/reference#get-users

Used in:

- `UserInfoPopup` to get ID, viewCount, displayName, createdAt of username we clicked
- `UserInfoPopup` to get ID, displayName, createdAt of username we clicked
- `CommandController` to power any commands that need to get a user ID
- `Toasts` to get the profile picture of a streamer who just went live
- `TwitchAccount` block and unblock features to translate user name to user ID
Expand Down
6 changes: 0 additions & 6 deletions src/widgets/dialogs/UserInfoPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <QNetworkAccessManager>
#include <QNetworkReply>

const QString TEXT_VIEWS("Views: %1");
const QString TEXT_FOLLOWERS("Followers: %1");
const QString TEXT_CREATED("Created: %1");
const QString TEXT_TITLE("%1's Usercard - #%2");
Expand Down Expand Up @@ -358,8 +357,6 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent)
}

// items on the left
vbox.emplace<Label>(TEXT_VIEWS.arg(""))
.assign(&this->ui_.viewCountLabel);
vbox.emplace<Label>(TEXT_FOLLOWERS.arg(""))
.assign(&this->ui_.followerCountLabel);
vbox.emplace<Label>(TEXT_CREATED.arg(""))
Expand Down Expand Up @@ -780,7 +777,6 @@ void UserInfoPopup::updateUserData()
// this can occur when the account doesn't exist.
this->ui_.followerCountLabel->setText(
TEXT_FOLLOWERS.arg(TEXT_UNAVAILABLE));
this->ui_.viewCountLabel->setText(TEXT_VIEWS.arg(TEXT_UNAVAILABLE));
this->ui_.createdDateLabel->setText(TEXT_CREATED.arg(TEXT_UNAVAILABLE));

this->ui_.nameLabel->setText(this->userName_);
Expand Down Expand Up @@ -817,8 +813,6 @@ void UserInfoPopup::updateUserData()

this->setWindowTitle(TEXT_TITLE.arg(
user.displayName, this->underlyingChannel_->getName()));
this->ui_.viewCountLabel->setText(
TEXT_VIEWS.arg(localizeNumbers(user.viewCount)));
this->ui_.createdDateLabel->setText(
TEXT_CREATED.arg(user.createdAt.section("T", 0, 0)));
this->ui_.userIDLabel->setText(TEXT_USER_ID + user.id);
Expand Down
1 change: 0 additions & 1 deletion src/widgets/dialogs/UserInfoPopup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class UserInfoPopup final : public BaseWindow

Label *nameLabel = nullptr;
Label *localizedNameLabel = nullptr;
Label *viewCountLabel = nullptr;
Label *followerCountLabel = nullptr;
Label *createdDateLabel = nullptr;
Label *userIDLabel = nullptr;
Expand Down

0 comments on commit d29243a

Please sign in to comment.