mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Correct unread counter after first topic open.
This commit is contained in:
parent
1a9c6749ae
commit
33c0c79593
1 changed files with 7 additions and 1 deletions
|
@ -860,7 +860,13 @@ std::optional<int> RepliesList::computeUnreadCountLocally(
|
|||
MsgId afterId) const {
|
||||
Expects(afterId >= _inboxReadTillId);
|
||||
|
||||
const auto wasUnreadCountAfter = _unreadCount.current();
|
||||
const auto currentUnreadCountAfter = _unreadCount.current();
|
||||
const auto startingMarkingAsRead = (currentUnreadCountAfter == 0)
|
||||
&& (_inboxReadTillId == 1)
|
||||
&& (afterId > 1);
|
||||
const auto wasUnreadCountAfter = startingMarkingAsRead
|
||||
? _fullCount.current().value_or(0)
|
||||
: currentUnreadCountAfter;
|
||||
const auto readTillId = std::max(afterId, _rootId);
|
||||
const auto wasReadTillId = _inboxReadTillId;
|
||||
const auto backLoaded = (_skippedBefore == 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue