Sort/Filter channel gifts by non-admins.

This commit is contained in:
John Preston 2025-01-31 12:54:40 +04:00
parent 33ca5ee39f
commit 1869071ef7
2 changed files with 20 additions and 19 deletions

View file

@ -446,8 +446,7 @@ void WrapWidget::setupTopBarMenuToggle() {
}, _topBar->lifetime());
} else if (section.type() == Section::Type::PeerGifts
&& key.peer()
&& key.peer()->isChannel()
&& key.peer()->canManageGifts()) {
&& key.peer()->isChannel()) {
addTopBarMenuButton();
}
}

View file

@ -630,6 +630,7 @@ void Widget::fillTopBarMenu(const Ui::Menu::MenuCallback &addAction) {
});
}, filter.skipUnique ? nullptr : &st::mediaPlayerMenuCheck);
if (_inner->peer()->canManageGifts()) {
addAction({ .isSeparator = true });
addAction(tr::lng_peer_gifts_filter_saved(tr::now), [=] {
@ -648,6 +649,7 @@ void Widget::fillTopBarMenu(const Ui::Menu::MenuCallback &addAction) {
}
});
}, filter.skipUnsaved ? nullptr : &st::mediaPlayerMenuCheck);
}
}
rpl::producer<QString> Widget::title() {