From 0ae2aee94cc8f01d56704fcb1eba832aea97fbc7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 13 Nov 2023 17:31:32 +0400 Subject: [PATCH] wip draft options --- .../view/controls/history_view_draft_options.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp b/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp index 6812cb2733f905..020936ed7f267d 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp @@ -271,6 +271,7 @@ rpl::producer PreviewWrap::showLinkSelector( message.text, TextUtilities::ConvertTextTagsToEntities(message.tags), }, links), +#if 0 // mtp MTP_messageMediaWebPage( MTP_flags(Flag() | (webpage.forceLargeMedia @@ -286,8 +287,19 @@ rpl::producer PreviewWrap::showLinkSelector( MTP_long(webpage.id), MTP_string(webpage.url), MTP_int(0))), +#endif HistoryMessageMarkupData(), uint64(0)); // groupedId + _draftItem->setMediaExplicit(std::make_unique( + _draftItem, + _history->owner().webpage(webpage.id), + (MediaWebPageFlag::Manual + | (webpage.forceLargeMedia + ? MediaWebPageFlag::ForceLargeMedia + : MediaWebPageFlag()) + | (webpage.forceSmallMedia + ? MediaWebPageFlag::ForceSmallMedia + : MediaWebPageFlag())))); _element = _draftItem->createView(_delegate.get()); _selectType = TextSelectType::Letters; _symbol = _selectionStartSymbol = 0;