mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Receive and track recent sticker usage date.
This commit is contained in:
@@ -4060,9 +4060,16 @@ void MainWidget::incrementSticker(DocumentData *sticker) {
|
||||
}
|
||||
auto index = it->stickers.indexOf(sticker);
|
||||
if (index > 0) {
|
||||
if (!it->dates.empty()) {
|
||||
Assert(it->dates.size() == it->stickers.size());
|
||||
it->dates.erase(it->dates.begin() + index);
|
||||
}
|
||||
it->stickers.removeAt(index);
|
||||
}
|
||||
if (index) {
|
||||
if (it->dates.size() == it->stickers.size()) {
|
||||
it->dates.insert(it->dates.begin(), unixtime());
|
||||
}
|
||||
it->stickers.push_front(sticker);
|
||||
writeRecentStickers = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user