2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-29 13:47:47 +00:00

Show button to remove recent sticker

It's already present, but only for local stickers.
This commit is contained in:
RadRussianRus 2020-09-07 05:47:09 +03:00
parent d8196dd35f
commit cc3b6d53ab

View File

@ -2214,6 +2214,10 @@ void StickersListWidget::removeRecentSticker(int section, int index) {
} }
} }
} }
Api::ToggleRecentSticker(
document,
Data::FileOriginStickerSet(Data::Stickers::RecentSetId, 0),
false);
if (refresh) { if (refresh) {
refreshRecentStickers(); refreshRecentStickers();
updateSelected(); updateSelected();
@ -2822,11 +2826,8 @@ bool StickersListWidget::setHasTitle(const Set &set) const {
} }
bool StickersListWidget::stickerHasDeleteButton(const Set &set, int index) const { bool StickersListWidget::stickerHasDeleteButton(const Set &set, int index) const {
if (set.id == Data::Stickers::RecentSetId) { return (set.id == Data::Stickers::RecentSetId
Assert(index >= 0 && index < _custom.size()); || set.id == Data::Stickers::FavedSetId);
return _custom[index];
}
return (set.id == Data::Stickers::FavedSetId);
} }
void StickersListWidget::setSelected(OverState newSelected) { void StickersListWidget::setSelected(OverState newSelected) {