mirror of https://github.com/procxx/kepka.git
Fix opening hashtag when in archive
This commit is contained in:
parent
07560188cf
commit
327c9caed7
|
@ -159,14 +159,21 @@ void activateBotCommand(
|
||||||
}
|
}
|
||||||
|
|
||||||
void searchByHashtag(const QString &tag, PeerData *inPeer) {
|
void searchByHashtag(const QString &tag, PeerData *inPeer) {
|
||||||
if (const auto m = App::main()) {
|
if (const auto window = App::wnd()) {
|
||||||
|
if (const auto controller = window->sessionController()) {
|
||||||
|
if (controller->openedFolder().current()) {
|
||||||
|
controller->closeFolder();
|
||||||
|
}
|
||||||
|
}
|
||||||
Ui::hideSettingsAndLayer();
|
Ui::hideSettingsAndLayer();
|
||||||
Core::App().hideMediaView();
|
Core::App().hideMediaView();
|
||||||
m->searchMessages(
|
if (const auto m = window->mainWidget()) {
|
||||||
tag + ' ',
|
m->searchMessages(
|
||||||
(inPeer && !inPeer->isUser())
|
tag + ' ',
|
||||||
? inPeer->owner().history(inPeer).get()
|
(inPeer && !inPeer->isUser())
|
||||||
: Dialogs::Key());
|
? inPeer->owner().history(inPeer).get()
|
||||||
|
: Dialogs::Key());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue