2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fix search in chat / jump to archive.

This commit is contained in:
John Preston
2022-12-22 11:25:24 +04:00
parent 7cf3babcbd
commit 191ea6f0f4
2 changed files with 8 additions and 3 deletions

View File

@@ -3703,8 +3703,11 @@ void InnerWidget::setupShortcuts() {
const auto folder = session().data().folderLoaded(
Data::Folder::kId);
if (folder && !folder->chatsList()->empty()) {
_controller->openFolder(folder);
_controller->window().hideSettingsAndLayer();
const auto controller = _controller;
controller->openFolder(folder);
// Calling openFolder() could've destroyed this widget.
controller->window().hideSettingsAndLayer();
return true;
}
return false;