Skip to content

Commit

Permalink
wip draft options
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Nov 13, 2023
1 parent 2de74b0 commit 0ae2aee
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ rpl::producer<QString> PreviewWrap::showLinkSelector(
message.text,
TextUtilities::ConvertTextTagsToEntities(message.tags),
}, links),
#if 0 // mtp
MTP_messageMediaWebPage(
MTP_flags(Flag()
| (webpage.forceLargeMedia
Expand All @@ -286,8 +287,19 @@ rpl::producer<QString> PreviewWrap::showLinkSelector(
MTP_long(webpage.id),
MTP_string(webpage.url),
MTP_int(0))),
#endif
HistoryMessageMarkupData(),
uint64(0)); // groupedId
_draftItem->setMediaExplicit(std::make_unique<Data::MediaWebPage>(
_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;
Expand Down

0 comments on commit 0ae2aee

Please sign in to comment.