mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't suggest userpics to paid-restricted.
This commit is contained in:
parent
4121c99f36
commit
d1e6150874
3 changed files with 5 additions and 3 deletions
|
@ -1078,7 +1078,9 @@ void BackgroundPreviewBox::updateServiceBg(const std::vector<QColor> &bg) {
|
||||||
? tr::lng_background_other_group(tr::now)
|
? tr::lng_background_other_group(tr::now)
|
||||||
: forChannel()
|
: forChannel()
|
||||||
? tr::lng_background_other_channel(tr::now)
|
? tr::lng_background_other_channel(tr::now)
|
||||||
: (_forPeer && !_fromMessageId)
|
: (_forPeer
|
||||||
|
&& !_fromMessageId
|
||||||
|
&& !_forPeer->starsPerMessageChecked())
|
||||||
? tr::lng_background_other_info(
|
? tr::lng_background_other_info(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_user,
|
lt_user,
|
||||||
|
|
|
@ -247,6 +247,7 @@ bool UserpicButton::canSuggestPhoto(not_null<UserData*> user) const {
|
||||||
// Server allows suggesting photos only in non-empty chats.
|
// Server allows suggesting photos only in non-empty chats.
|
||||||
return !user->isSelf()
|
return !user->isSelf()
|
||||||
&& !user->isBot()
|
&& !user->isBot()
|
||||||
|
&& !user->starsPerMessageChecked()
|
||||||
&& (user->owner().history(user)->lastServerMessage() != nullptr);
|
&& (user->owner().history(user)->lastServerMessage() != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1203,8 +1203,7 @@ void Filler::addThemeEdit() {
|
||||||
if (!user || user->isInaccessible()) {
|
if (!user || user->isInaccessible()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((user->requiresPremiumToWrite() && !user->session().premium())
|
if (user->requiresPremiumToWrite() && !user->session().premium()) {
|
||||||
|| user->starsPerMessage() > 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto controller = _controller;
|
const auto controller = _controller;
|
||||||
|
|
Loading…
Add table
Reference in a new issue