mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Added initial box for premium gifts.
This commit is contained in:
@@ -202,6 +202,7 @@ private:
|
||||
void addNewMembers();
|
||||
void addDeleteContact();
|
||||
void addTTLSubmenu(bool addSeparator);
|
||||
void addGiftPremium();
|
||||
|
||||
not_null<SessionController*> _controller;
|
||||
Dialogs::EntryState _request;
|
||||
@@ -806,6 +807,24 @@ void Filler::addTTLSubmenu(bool addSeparator) {
|
||||
}
|
||||
}
|
||||
|
||||
void Filler::addGiftPremium() {
|
||||
const auto user = _peer->asUser();
|
||||
if (!user
|
||||
|| user->isInaccessible()
|
||||
|| user->isSelf()
|
||||
|| user->isBot()
|
||||
|| user->isNotificationsUser()
|
||||
|| !user->canReceiveGifts()
|
||||
|| user->isRepliesChat()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto navigation = _controller;
|
||||
_addAction(tr::lng_profile_gift_premium(tr::now), [=] {
|
||||
navigation->showGiftPremiumBox(user);
|
||||
}, &st::menuIconGiftPremium);
|
||||
}
|
||||
|
||||
void Filler::fill() {
|
||||
if (_folder) {
|
||||
fillArchiveActions();
|
||||
@@ -862,6 +881,7 @@ void Filler::fillProfileActions() {
|
||||
addNewContact();
|
||||
addShareContact();
|
||||
addEditContact();
|
||||
addGiftPremium();
|
||||
addBotToGroup();
|
||||
addNewMembers();
|
||||
addManageChat();
|
||||
|
Reference in New Issue
Block a user