mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Merge branch 'master' of https://github.com/Chatterino/chatterino2 into master
This commit is contained in:
commit
8bc3025a77
2 changed files with 16 additions and 19 deletions
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include <QCheckBox>
|
||||
#include <QDesktopServices>
|
||||
#include <QLabel>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
|
||||
|
@ -164,10 +163,8 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically)
|
|||
.assign(&this->ui_.followerCountLabel);
|
||||
vbox.emplace<Label>(TEXT_CREATED.arg(""))
|
||||
.assign(&this->ui_.createdDateLabel);
|
||||
vbox.emplace<Line>(true);
|
||||
vbox.emplace<Label>("")
|
||||
.assign(&this->ui_.followageSubageLabel)
|
||||
->setMinimumSize(this->minimumSizeHint());
|
||||
vbox.emplace<Label>("").assign(&this->ui_.followageLabel);
|
||||
vbox.emplace<Label>("").assign(&this->ui_.subageLabel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -667,34 +664,33 @@ void UserInfoPopup::updateUserData()
|
|||
return;
|
||||
}
|
||||
|
||||
QString labelText;
|
||||
|
||||
if (!subageInfo.followingSince.isEmpty())
|
||||
{
|
||||
QDateTime followedAt = QDateTime::fromString(
|
||||
subageInfo.followingSince, Qt::ISODate);
|
||||
QString followingSince = followedAt.toString("yyyy-MM-dd");
|
||||
labelText = "Following since " + followingSince;
|
||||
this->ui_.followageLabel->setText("❤ Following since " +
|
||||
followingSince);
|
||||
}
|
||||
|
||||
if (subageInfo.isSubHidden)
|
||||
{
|
||||
labelText += "\nSubscribtion status hidden";
|
||||
this->ui_.subageLabel->setText(
|
||||
"Subscription status hidden");
|
||||
}
|
||||
if (subageInfo.isSubbed)
|
||||
else if (subageInfo.isSubbed)
|
||||
{
|
||||
labelText += QString("\nTier %1 - Subscribed for %2 months")
|
||||
this->ui_.subageLabel->setText(
|
||||
QString("★ Tier %1 - Subscribed for %2 months")
|
||||
.arg(subageInfo.subTier)
|
||||
.arg(subageInfo.totalSubMonths);
|
||||
.arg(subageInfo.totalSubMonths));
|
||||
}
|
||||
else if (subageInfo.totalSubMonths)
|
||||
{
|
||||
labelText +=
|
||||
QString("\nPreviously subscribed for %1 months")
|
||||
.arg(subageInfo.totalSubMonths);
|
||||
this->ui_.subageLabel->setText(
|
||||
QString("★ Previously subscribed for %1 months")
|
||||
.arg(subageInfo.totalSubMonths));
|
||||
}
|
||||
|
||||
this->ui_.followageSubageLabel->setText(labelText);
|
||||
},
|
||||
[] {});
|
||||
};
|
||||
|
|
|
@ -55,7 +55,8 @@ private:
|
|||
Label *followerCountLabel = nullptr;
|
||||
Label *createdDateLabel = nullptr;
|
||||
Label *userIDLabel = nullptr;
|
||||
Label *followageSubageLabel = nullptr;
|
||||
Label *followageLabel = nullptr;
|
||||
Label *subageLabel = nullptr;
|
||||
|
||||
QCheckBox *follow = nullptr;
|
||||
QCheckBox *ignore = nullptr;
|
||||
|
|
Loading…
Reference in a new issue