Allow filtering users gifts.

This commit is contained in:
John Preston 2025-02-10 10:43:37 +04:00
parent 482e337762
commit c9cfe9e90f
2 changed files with 2 additions and 4 deletions

View file

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

View file

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