2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Go through open history in support mode.

This commit is contained in:
John Preston
2018-12-30 16:50:23 +04:00
parent c11b977f1d
commit 2cd3cec478
6 changed files with 85 additions and 19 deletions

View File

@@ -2921,25 +2921,12 @@ Dialogs::RowDescriptor DialogsInner::computeJump(
return result;
}
bool DialogsInner::jumpToDialogRow(const Dialogs::RowDescriptor &to) {
bool DialogsInner::jumpToDialogRow(Dialogs::RowDescriptor to) {
if (to == chatListEntryLast()) {
_listBottomReached.fire({});
}
if (const auto history = to.key.history()) {
Ui::showPeerHistory(
history,
(uniqueSearchResults()
? ShowAtUnreadMsgId
: to.fullId.msg));
return true;
} else if (const auto feed = to.key.feed()) {
if (const auto item = App::histItemById(to.fullId)) {
_controller->showSection(
HistoryFeed::Memento(feed, item->position()));
} else {
_controller->showSection(HistoryFeed::Memento(feed));
}
if (uniqueSearchResults()) {
to.fullId = FullMsgId();
}
return false;
return _controller->jumpToChatListEntry(to);
}