Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed total views from the usercard #3792

Merged
merged 5 commits into from
Jun 5, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. (#3792)
mmattbtw marked this conversation as resolved.
Show resolved Hide resolved
- 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