diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index 1d3e1d3b3..98cadc406 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -2993,11 +2993,16 @@ RowDescriptor InnerWidget::computeJump( const RowDescriptor &to, JumpSkip skip) { auto result = to; - if (session().supportMode() && result.key) { + if (result.key) { const auto down = (skip == JumpSkip::NextOrEnd) || (skip == JumpSkip::NextOrOriginal); - while (!result.key.entry()->chatListUnreadCount() - && !result.key.entry()->chatListUnreadMark()) { + const auto needSkip = [&] { + return (result.key.folder() != nullptr) + || (session().supportMode() + && !result.key.entry()->chatListUnreadCount() + && !result.key.entry()->chatListUnreadMark()); + }; + while (needSkip()) { const auto next = down ? chatListEntryAfter(result) : chatListEntryBefore(result);