mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Don't show user badge in star stats rows.
This commit is contained in:
parent
88703ba1eb
commit
828ecabc78
3 changed files with 10 additions and 3 deletions
|
@ -764,13 +764,14 @@ int PeerListRow::paintNameIconGetWidth(
|
|||
int availableWidth,
|
||||
int outerWidth,
|
||||
bool selected) {
|
||||
if (special()
|
||||
if (_skipPeerBadge
|
||||
|| special()
|
||||
|| !_savedMessagesStatus.isEmpty()
|
||||
|| _isRepliesMessagesChat
|
||||
|| _isVerifyCodesChat) {
|
||||
return 0;
|
||||
}
|
||||
return _bagde.drawGetWidth(
|
||||
return _badge.drawGetWidth(
|
||||
p,
|
||||
QRect(
|
||||
nameLeft,
|
||||
|
|
|
@ -254,6 +254,10 @@ public:
|
|||
return _nameFirstLetters;
|
||||
}
|
||||
|
||||
void setSkipPeerBadge(bool skip) {
|
||||
_skipPeerBadge = skip;
|
||||
}
|
||||
|
||||
virtual void lazyInitialize(const style::PeerListItem &st);
|
||||
virtual void paintStatusText(
|
||||
Painter &p,
|
||||
|
@ -291,7 +295,7 @@ private:
|
|||
std::unique_ptr<Ui::RoundImageCheckbox> _checkbox;
|
||||
Ui::Text::String _name;
|
||||
Ui::Text::String _status;
|
||||
Ui::PeerBadge _bagde;
|
||||
Ui::PeerBadge _badge;
|
||||
StatusType _statusType = StatusType::Online;
|
||||
crl::time _statusValidTill = 0;
|
||||
base::flat_set<QChar> _nameFirstLetters;
|
||||
|
@ -303,6 +307,7 @@ private:
|
|||
bool _isSearchResult : 1 = false;
|
||||
bool _isRepliesMessagesChat : 1 = false;
|
||||
bool _isVerifyCodesChat : 1 = false;
|
||||
bool _skipPeerBadge : 1 = false;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -851,6 +851,7 @@ void CreditsRow::init() {
|
|||
? name
|
||||
: _entry.title;
|
||||
const auto joiner = QString(QChar(' ')) + QChar(8212) + QChar(' ');
|
||||
setSkipPeerBadge(true);
|
||||
PeerListRow::setCustomStatus(
|
||||
langDateTime(_entry.date)
|
||||
+ (_entry.refunded
|
||||
|
|
Loading…
Add table
Reference in a new issue