Add optional parameter to /usercard command for opening a usercard in a different channel context. (#3172)
Co-authored-by: apa420 <17131426+apa420@users.noreply.github.com> Co-authored-by: Mm2PL <mm2pl+gh@kotmisia.pl> Co-authored-by: Leon Richardt <leon.richardt@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
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");
|
||||
const QString TEXT_TITLE("%1's Usercard - #%2");
|
||||
#define TEXT_USER_ID "ID: "
|
||||
#define TEXT_UNAVAILABLE "(not available)"
|
||||
|
||||
@@ -513,7 +513,7 @@ void UserInfoPopup::setData(const QString &name, const ChannelPtr &channel)
|
||||
{
|
||||
this->userName_ = name;
|
||||
this->channel_ = channel;
|
||||
this->setWindowTitle(TEXT_TITLE.arg(name));
|
||||
this->setWindowTitle(TEXT_TITLE.arg(name, channel->getName()));
|
||||
|
||||
this->ui_.nameLabel->setText(name);
|
||||
this->ui_.nameLabel->setProperty("copy-text", name);
|
||||
@@ -598,7 +598,8 @@ void UserInfoPopup::updateUserData()
|
||||
this->avatarUrl_ = user.profileImageUrl;
|
||||
|
||||
this->ui_.nameLabel->setText(user.displayName);
|
||||
this->setWindowTitle(TEXT_TITLE.arg(user.displayName));
|
||||
this->setWindowTitle(
|
||||
TEXT_TITLE.arg(user.displayName, this->channel_->getName()));
|
||||
this->ui_.viewCountLabel->setText(
|
||||
TEXT_VIEWS.arg(localizeNumbers(user.viewCount)));
|
||||
this->ui_.createdDateLabel->setText(
|
||||
|
||||
Reference in New Issue
Block a user