fix: smth

This commit is contained in:
AlexeyZavar 2024-11-23 08:54:20 +03:00
parent 9237a08b53
commit d6145f383d
4 changed files with 14 additions and 15 deletions

View file

@ -193,16 +193,14 @@ void AddUserMessagesAction(not_null<Ui::PopupMenu*> menu, HistoryItem *item) {
tr::ayu_UserMessagesMenuText(tr::now), tr::ayu_UserMessagesMenuText(tr::now),
[=] [=]
{ {
if (const auto window = item->history()->session().tryResolveWindow()) { if (const auto controller = item->history()->session().tryResolveWindow()) {
if (const auto mainWidget = window->widget()->sessionController()) {
const auto peer = item->history()->peer; const auto peer = item->history()->peer;
const auto key = (peer && !peer->isUser()) const auto key = (peer && !peer->isUser())
? item->topic() ? item->topic()
? Dialogs::Key{item->topic()} ? Dialogs::Key{item->topic()}
: Dialogs::Key{item->history()} : Dialogs::Key{item->history()}
: Dialogs::Key(); : Dialogs::Key{item->history()};
mainWidget->content()->searchMessages(QString(), key, item->from()); controller->searchInChat(key, item->from());
}
} }
}, },
&st::menuIconTTL); &st::menuIconTTL);

View file

@ -53,6 +53,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ayu/features/messageshot/message_shot.h" #include "ayu/features/messageshot/message_shot.h"
#include "ayu/utils/telegram_helpers.h" #include "ayu/utils/telegram_helpers.h"
namespace HistoryView { namespace HistoryView {
namespace { namespace {

View file

@ -8,7 +8,7 @@ Terminal=false
StartupWMClass=AyuGram StartupWMClass=AyuGram
Type=Application Type=Application
Categories=Chat;Network;InstantMessaging;Qt; Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg; MimeType=x-scheme-handler/tg;x-scheme-handler/tonsite;
Keywords=tg;chat;im;messaging;messenger;sms;telegram;tdesktop; Keywords=tg;chat;im;messaging;messenger;sms;telegram;tdesktop;
Actions=quit; Actions=quit;
DBusActivatable=true DBusActivatable=true