2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Forget least used images gradually.

This commit is contained in:
John Preston
2018-10-23 15:12:30 +04:00
parent 595134cab5
commit f8eef7c9a6
10 changed files with 273 additions and 124 deletions

View File

@@ -691,9 +691,11 @@ StickersListWidget::StickersListWidget(QWidget *parent, not_null<Window::Control
_previewTimer.setSingleShot(true);
connect(&_previewTimer, SIGNAL(timeout()), this, SLOT(onPreview()));
subscribe(Auth().downloaderTaskFinished(), [this] {
update();
readVisibleSets();
subscribe(Auth().downloaderTaskFinished(), [=] {
if (isVisible()) {
update();
readVisibleSets();
}
});
subscribe(Notify::PeerUpdated(), Notify::PeerUpdatedHandler(Notify::PeerUpdate::Flag::ChannelStickersChanged, [this](const Notify::PeerUpdate &update) {
if (update.peer == _megagroupSet) {