mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 availableWidth,
|
||||||
int outerWidth,
|
int outerWidth,
|
||||||
bool selected) {
|
bool selected) {
|
||||||
if (special()
|
if (_skipPeerBadge
|
||||||
|
|| special()
|
||||||
|| !_savedMessagesStatus.isEmpty()
|
|| !_savedMessagesStatus.isEmpty()
|
||||||
|| _isRepliesMessagesChat
|
|| _isRepliesMessagesChat
|
||||||
|| _isVerifyCodesChat) {
|
|| _isVerifyCodesChat) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return _bagde.drawGetWidth(
|
return _badge.drawGetWidth(
|
||||||
p,
|
p,
|
||||||
QRect(
|
QRect(
|
||||||
nameLeft,
|
nameLeft,
|
||||||
|
|
|
@ -254,6 +254,10 @@ public:
|
||||||
return _nameFirstLetters;
|
return _nameFirstLetters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setSkipPeerBadge(bool skip) {
|
||||||
|
_skipPeerBadge = skip;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void lazyInitialize(const style::PeerListItem &st);
|
virtual void lazyInitialize(const style::PeerListItem &st);
|
||||||
virtual void paintStatusText(
|
virtual void paintStatusText(
|
||||||
Painter &p,
|
Painter &p,
|
||||||
|
@ -291,7 +295,7 @@ private:
|
||||||
std::unique_ptr<Ui::RoundImageCheckbox> _checkbox;
|
std::unique_ptr<Ui::RoundImageCheckbox> _checkbox;
|
||||||
Ui::Text::String _name;
|
Ui::Text::String _name;
|
||||||
Ui::Text::String _status;
|
Ui::Text::String _status;
|
||||||
Ui::PeerBadge _bagde;
|
Ui::PeerBadge _badge;
|
||||||
StatusType _statusType = StatusType::Online;
|
StatusType _statusType = StatusType::Online;
|
||||||
crl::time _statusValidTill = 0;
|
crl::time _statusValidTill = 0;
|
||||||
base::flat_set<QChar> _nameFirstLetters;
|
base::flat_set<QChar> _nameFirstLetters;
|
||||||
|
@ -303,6 +307,7 @@ private:
|
||||||
bool _isSearchResult : 1 = false;
|
bool _isSearchResult : 1 = false;
|
||||||
bool _isRepliesMessagesChat : 1 = false;
|
bool _isRepliesMessagesChat : 1 = false;
|
||||||
bool _isVerifyCodesChat : 1 = false;
|
bool _isVerifyCodesChat : 1 = false;
|
||||||
|
bool _skipPeerBadge : 1 = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -851,6 +851,7 @@ void CreditsRow::init() {
|
||||||
? name
|
? name
|
||||||
: _entry.title;
|
: _entry.title;
|
||||||
const auto joiner = QString(QChar(' ')) + QChar(8212) + QChar(' ');
|
const auto joiner = QString(QChar(' ')) + QChar(8212) + QChar(' ');
|
||||||
|
setSkipPeerBadge(true);
|
||||||
PeerListRow::setCustomStatus(
|
PeerListRow::setCustomStatus(
|
||||||
langDateTime(_entry.date)
|
langDateTime(_entry.date)
|
||||||
+ (_entry.refunded
|
+ (_entry.refunded
|
||||||
|
|
Loading…
Add table
Reference in a new issue