mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
fix: make it build
This commit is contained in:
parent
01b8602437
commit
0b1e6bd1de
5 changed files with 32 additions and 24 deletions
|
@ -77,22 +77,23 @@ void AddUserMessagesAction(not_null<Ui::PopupMenu*> menu, HistoryItem *item) {
|
|||
}
|
||||
|
||||
if (item->history()->peer->isChat() || item->history()->peer->isMegagroup()) {
|
||||
menu->addAction(tr::ayu_UserMessagesMenuText(tr::now),
|
||||
[=]
|
||||
{
|
||||
if (const auto window = item->history()->session().tryResolveWindow()) {
|
||||
if (const auto mainWidget = window->widget()->sessionController()) {
|
||||
const auto peer = item->history()->peer;
|
||||
const auto key = (peer && !peer->isUser())
|
||||
? item->topic()
|
||||
? Dialogs::Key{item->topic()}
|
||||
: Dialogs::Key{item->history()}
|
||||
: Dialogs::Key();
|
||||
mainWidget->content()->searchMessages(QString(), key, item->from()->asUser());
|
||||
}
|
||||
}
|
||||
},
|
||||
&st::menuIconTTL);
|
||||
menu->addAction(
|
||||
tr::ayu_UserMessagesMenuText(tr::now),
|
||||
[=]
|
||||
{
|
||||
if (const auto window = item->history()->session().tryResolveWindow()) {
|
||||
if (const auto mainWidget = window->widget()->sessionController()) {
|
||||
const auto peer = item->history()->peer;
|
||||
const auto key = (peer && !peer->isUser())
|
||||
? item->topic()
|
||||
? Dialogs::Key{item->topic()}
|
||||
: Dialogs::Key{item->history()}
|
||||
: Dialogs::Key();
|
||||
mainWidget->content()->searchMessages(QString(), key, item->from()->asUser());
|
||||
}
|
||||
}
|
||||
},
|
||||
&st::menuIconTTL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -610,13 +610,18 @@ void InnerWidget::elementStartInteraction(not_null<const Element*> view) {
|
|||
}
|
||||
|
||||
void InnerWidget::elementStartPremium(
|
||||
not_null<const Element*> view,
|
||||
Element *replacing) {
|
||||
not_null<const HistoryView::Element*> view,
|
||||
HistoryView::Element *replacing) {
|
||||
}
|
||||
|
||||
void InnerWidget::elementCancelPremium(not_null<const Element*> view) {
|
||||
}
|
||||
|
||||
void InnerWidget::elementStartEffect(
|
||||
not_null<const Element*> view,
|
||||
Element *replacing) {
|
||||
}
|
||||
|
||||
QString InnerWidget::elementAuthorRank(not_null<const Element*> view) {
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -127,10 +127,11 @@ public:
|
|||
void elementStartPremium(
|
||||
not_null<const HistoryView::Element*> view,
|
||||
HistoryView::Element *replacing) override;
|
||||
void elementCancelPremium(
|
||||
not_null<const HistoryView::Element*> view) override;
|
||||
QString elementAuthorRank(
|
||||
not_null<const HistoryView::Element*> view) override;
|
||||
void elementCancelPremium(not_null<const HistoryView::Element*> view) override;
|
||||
void elementStartEffect(
|
||||
not_null<const HistoryView::Element*> view,
|
||||
HistoryView::Element *replacing) override;
|
||||
QString elementAuthorRank(not_null<const HistoryView::Element*> view) override;
|
||||
|
||||
~InnerWidget();
|
||||
|
||||
|
|
|
@ -730,13 +730,14 @@ void MainWidget::hideSingleUseKeyboard(FullMsgId replyToId) {
|
|||
_history->hideSingleUseKeyboard(replyToId);
|
||||
}
|
||||
|
||||
void MainWidget::searchMessages(const QString &query, Dialogs::Key inChat) {
|
||||
void MainWidget::searchMessages(const QString &query, Dialogs::Key inChat, UserData *from) {
|
||||
auto tags = Data::SearchTagsFromQuery(query);
|
||||
if (controller()->isPrimary()) {
|
||||
auto state = Dialogs::SearchState{
|
||||
.inChat = ((tags.empty() || inChat.sublist())
|
||||
? inChat
|
||||
: session().data().history(session().user())),
|
||||
.fromPeer = from,
|
||||
.tags = tags,
|
||||
.query = tags.empty() ? query : QString(),
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 07cda692d99a9acdea6406516fead0a1517ab032
|
||||
Subproject commit 2918db18e0fb2d1be05d4e43fb9192e3a7cf6408
|
Loading…
Add table
Reference in a new issue