mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Attempt to fix jump to unread in some cases.
This commit is contained in:
parent
84ec2a5f74
commit
39c1da6642
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
}();
|
||||
|
|
Loading…
Add table
Reference in a new issue