Attempt to fix jump to unread in some cases.

This commit is contained in:
John Preston 2024-05-15 18:55:39 +04:00
parent 84ec2a5f74
commit 39c1da6642

View file

@ -368,6 +368,16 @@ bool RepliesList::buildFromData(not_null<Viewer*> viewer) {
return viewer->around;
} else if (const auto item = lookupRoot()) {
return computeInboxReadTillFull();
} else if (_owningTopic) {
// Somehow we don't want always to jump to computed inboxReadTill
// (this was in the code before, but I don't remember why).
// Maybe in case we "View Thread" from a group we don't really
// want to jump to unread inside thread, cause it isn't defined.
//
// But in case of topics we definitely want to support jumping
// to the first unread, even if it is General topic without the
// actual root message or it is a broken topic without root.
return computeInboxReadTillFull();
}
return viewer->around;
}();