mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +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()))),
|
int(std::numeric_limits<ushort>::max()))),
|
||||||
.muted = mute,
|
.muted = mute,
|
||||||
});
|
});
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!unreadCount) {
|
||||||
if (unreadCount) {
|
_unreadCounts.erase(it);
|
||||||
it->second.count = unreadCount;
|
update();
|
||||||
it->second.cache = cacheUnreadCount(unreadCount, mute);
|
} else if (it->second.count != unreadCount || it->second.muted != mute) {
|
||||||
} else {
|
it->second.count = unreadCount;
|
||||||
_unreadCounts.erase(it);
|
it->second.muted = mute;
|
||||||
}
|
it->second.cache = cacheUnreadCount(unreadCount, mute);
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
if (unreadCount) {
|
if (unreadCount) {
|
||||||
const auto widthIndex = (unreadCount < 10)
|
const auto widthIndex = (unreadCount < 10)
|
||||||
|
|
|
@ -118,6 +118,7 @@ void DiscreteSlider::refresh() {
|
||||||
_selected = 0;
|
_selected = 0;
|
||||||
}
|
}
|
||||||
resizeToWidth(width());
|
resizeToWidth(width());
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscreteSlider::Range DiscreteSlider::getFinalActiveRange() const {
|
DiscreteSlider::Range DiscreteSlider::getFinalActiveRange() const {
|
||||||
|
|
Loading…
Add table
Reference in a new issue