mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix search in chat / jump to archive.
This commit is contained in:
parent
7cf3babcbd
commit
191ea6f0f4
2 changed files with 8 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -2161,7 +2161,9 @@ bool Widget::setSearchInChat(Key chat, PeerData *from) {
|
|||
}
|
||||
_searchInMigrated = nullptr;
|
||||
if (peer) {
|
||||
if (const auto migrateTo = peer->migrateTo()) {
|
||||
if (_layout != Layout::Main) {
|
||||
return false;
|
||||
} else if (const auto migrateTo = peer->migrateTo()) {
|
||||
return setSearchInChat(peer->owner().history(migrateTo), from);
|
||||
} else if (const auto migrateFrom = peer->migrateFrom()) {
|
||||
if (!forum) {
|
||||
|
|
Loading…
Add table
Reference in a new issue