mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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()) {
|
if (item->history()->peer->isChat() || item->history()->peer->isMegagroup()) {
|
||||||
menu->addAction(tr::ayu_UserMessagesMenuText(tr::now),
|
menu->addAction(
|
||||||
[=]
|
tr::ayu_UserMessagesMenuText(tr::now),
|
||||||
{
|
[=]
|
||||||
if (const auto window = item->history()->session().tryResolveWindow()) {
|
{
|
||||||
if (const auto mainWidget = window->widget()->sessionController()) {
|
if (const auto window = item->history()->session().tryResolveWindow()) {
|
||||||
const auto peer = item->history()->peer;
|
if (const auto mainWidget = window->widget()->sessionController()) {
|
||||||
const auto key = (peer && !peer->isUser())
|
const auto peer = item->history()->peer;
|
||||||
? item->topic()
|
const auto key = (peer && !peer->isUser())
|
||||||
? Dialogs::Key{item->topic()}
|
? item->topic()
|
||||||
: Dialogs::Key{item->history()}
|
? Dialogs::Key{item->topic()}
|
||||||
: Dialogs::Key();
|
: Dialogs::Key{item->history()}
|
||||||
mainWidget->content()->searchMessages(QString(), key, item->from()->asUser());
|
: Dialogs::Key();
|
||||||
}
|
mainWidget->content()->searchMessages(QString(), key, item->from()->asUser());
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
&st::menuIconTTL);
|
},
|
||||||
|
&st::menuIconTTL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -610,13 +610,18 @@ void InnerWidget::elementStartInteraction(not_null<const Element*> view) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void InnerWidget::elementStartPremium(
|
void InnerWidget::elementStartPremium(
|
||||||
not_null<const Element*> view,
|
not_null<const HistoryView::Element*> view,
|
||||||
Element *replacing) {
|
HistoryView::Element *replacing) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void InnerWidget::elementCancelPremium(not_null<const Element*> view) {
|
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) {
|
QString InnerWidget::elementAuthorRank(not_null<const Element*> view) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,10 +127,11 @@ public:
|
||||||
void elementStartPremium(
|
void elementStartPremium(
|
||||||
not_null<const HistoryView::Element*> view,
|
not_null<const HistoryView::Element*> view,
|
||||||
HistoryView::Element *replacing) override;
|
HistoryView::Element *replacing) override;
|
||||||
void elementCancelPremium(
|
void elementCancelPremium(not_null<const HistoryView::Element*> view) override;
|
||||||
not_null<const HistoryView::Element*> view) override;
|
void elementStartEffect(
|
||||||
QString elementAuthorRank(
|
not_null<const HistoryView::Element*> view,
|
||||||
not_null<const HistoryView::Element*> view) override;
|
HistoryView::Element *replacing) override;
|
||||||
|
QString elementAuthorRank(not_null<const HistoryView::Element*> view) override;
|
||||||
|
|
||||||
~InnerWidget();
|
~InnerWidget();
|
||||||
|
|
||||||
|
|
|
@ -730,13 +730,14 @@ void MainWidget::hideSingleUseKeyboard(FullMsgId replyToId) {
|
||||||
_history->hideSingleUseKeyboard(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);
|
auto tags = Data::SearchTagsFromQuery(query);
|
||||||
if (controller()->isPrimary()) {
|
if (controller()->isPrimary()) {
|
||||||
auto state = Dialogs::SearchState{
|
auto state = Dialogs::SearchState{
|
||||||
.inChat = ((tags.empty() || inChat.sublist())
|
.inChat = ((tags.empty() || inChat.sublist())
|
||||||
? inChat
|
? inChat
|
||||||
: session().data().history(session().user())),
|
: session().data().history(session().user())),
|
||||||
|
.fromPeer = from,
|
||||||
.tags = tags,
|
.tags = tags,
|
||||||
.query = tags.empty() ? query : QString(),
|
.query = tags.empty() ? query : QString(),
|
||||||
};
|
};
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 07cda692d99a9acdea6406516fead0a1517ab032
|
Subproject commit 2918db18e0fb2d1be05d4e43fb9192e3a7cf6408
|
Loading…
Add table
Reference in a new issue