[Improvement] Scroll to dialog on back button click

This commit is contained in:
Eric Kotato 2022-09-11 06:51:07 +03:00 committed by Eric Kotato
parent c8d491c6a3
commit efd3b91e0f

View file

@ -1462,13 +1462,13 @@ void MainWidget::showHistory(
} }
if (_dialogs && !_dialogs->isHidden()) { if (_dialogs && !_dialogs->isHidden()) {
if (!back) { // if (!back) {
if (const auto history = _history->history()) { if (const auto history = _history->history()) {
_dialogs->scrollToEntry(Dialogs::RowDescriptor( _dialogs->scrollToEntry(Dialogs::RowDescriptor(
history, history,
FullMsgId(history->peer->id, showAtMsgId))); FullMsgId(history->peer->id, showAtMsgId)));
} }
} // }
_dialogs->update(); _dialogs->update();
} }