Fix unread count update in folder strip.

This commit is contained in:
John Preston 2025-05-07 16:39:42 +04:00
parent f96f478470
commit a49cb06d77
2 changed files with 10 additions and 7 deletions

View file

@ -101,14 +101,16 @@ void ChatsFiltersTabs::setUnreadCount(int index, int unreadCount, bool mute) {
int(std::numeric_limits<ushort>::max()))),
.muted = mute,
});
update();
}
} else {
if (unreadCount) {
it->second.count = unreadCount;
it->second.cache = cacheUnreadCount(unreadCount, mute);
} else {
_unreadCounts.erase(it);
}
} else if (!unreadCount) {
_unreadCounts.erase(it);
update();
} else if (it->second.count != unreadCount || it->second.muted != mute) {
it->second.count = unreadCount;
it->second.muted = mute;
it->second.cache = cacheUnreadCount(unreadCount, mute);
update();
}
if (unreadCount) {
const auto widthIndex = (unreadCount < 10)

View file

@ -118,6 +118,7 @@ void DiscreteSlider::refresh() {
_selected = 0;
}
resizeToWidth(width());
update();
}
DiscreteSlider::Range DiscreteSlider::getFinalActiveRange() const {