From 04c068d8b3b92c335eaada13ed42f2b7330a1454 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 16 Nov 2020 21:09:53 +0300 Subject: [PATCH] Added filling send context menu to TabbedSelector from ComposeControls. --- .../history/view/controls/history_view_compose_controls.cpp | 2 ++ .../history/view/history_view_replies_section.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index e5b232f366..bc753817b1 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -1396,6 +1396,8 @@ void ComposeControls::initTabbedSelector() { selector->inlineResultChosen( ) | rpl::start_to_stream(_inlineResultChosen, wrap->lifetime()); + + selector->setSendMenuType([=] { return sendMenuType(); }); } void ComposeControls::initSendButton() { diff --git a/Telegram/SourceFiles/history/view/history_view_replies_section.cpp b/Telegram/SourceFiles/history/view/history_view_replies_section.cpp index 4be479126c..9e7e592458 100644 --- a/Telegram/SourceFiles/history/view/history_view_replies_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_replies_section.cpp @@ -470,17 +470,17 @@ void RepliesWidget::setupComposeControls() { _composeControls->fileChosen( ) | rpl::start_with_next([=](Selector::FileChosen chosen) { - sendExistingDocument(chosen.document); + sendExistingDocument(chosen.document, chosen.options); }, lifetime()); _composeControls->photoChosen( ) | rpl::start_with_next([=](Selector::PhotoChosen chosen) { - sendExistingPhoto(chosen.photo); + sendExistingPhoto(chosen.photo, chosen.options); }, lifetime()); _composeControls->inlineResultChosen( ) | rpl::start_with_next([=](Selector::InlineChosen chosen) { - sendInlineResult(chosen.result, chosen.bot); + sendInlineResult(chosen.result, chosen.bot, chosen.options); }, lifetime()); _composeControls->scrollRequests(