mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Fix unread count update in folder strip.
This commit is contained in:
parent
f96f478470
commit
a49cb06d77
2 changed files with 10 additions and 7 deletions
|
@ -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)
|
||||
|
|
|
@ -118,6 +118,7 @@ void DiscreteSlider::refresh() {
|
|||
_selected = 0;
|
||||
}
|
||||
resizeToWidth(width());
|
||||
update();
|
||||
}
|
||||
|
||||
DiscreteSlider::Range DiscreteSlider::getFinalActiveRange() const {
|
||||
|
|
Loading…
Add table
Reference in a new issue