mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Mark history as read at the bottom in any case.
This commit is contained in:
parent
bca444b92e
commit
71e0e6ac4d
1 changed files with 3 additions and 1 deletions
|
@ -2545,7 +2545,9 @@ void HistoryWidget::visibleAreaUpdated() {
|
|||
_list->visibleAreaUpdated(scrollTop, scrollBottom);
|
||||
if (_history->loadedAtBottom() && (_history->unreadCount() > 0 || (_migrated && _migrated->unreadCount() > 0))) {
|
||||
auto showFrom = (_migrated && _migrated->showFrom) ? _migrated->showFrom : (_history ? _history->showFrom : nullptr);
|
||||
if (showFrom && !showFrom->detached() && scrollBottom > _list->itemTop(showFrom) && App::wnd()->doWeReadServerHistory()) {
|
||||
auto showFromVisible = (showFrom && !showFrom->detached() && scrollBottom > _list->itemTop(showFrom));
|
||||
auto atBottom = (scrollTop >= _scroll->scrollTopMax());
|
||||
if ((showFromVisible || atBottom) && App::wnd()->doWeReadServerHistory()) {
|
||||
historyWasRead(ReadServerHistoryChecks::OnlyIfUnread);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue