Fix media caption adding link in replies/scheduled.

This commit is contained in:
John Preston 2023-11-02 19:58:07 +04:00
parent b41c94be29
commit 8927a1b9a2
1 changed files with 5 additions and 0 deletions

View File

@ -1940,6 +1940,7 @@ void ComposeControls::applyDraft(FieldHistoryAction fieldHistoryAction) {
_header->replyToMessage({}); _header->replyToMessage({});
if (_preview) { if (_preview) {
_preview->apply({ .removed = true }); _preview->apply({ .removed = true });
_preview->setDisabled(false);
} }
_canReplaceMedia = false; _canReplaceMedia = false;
_photoEditMedia = nullptr; _photoEditMedia = nullptr;
@ -1978,6 +1979,7 @@ void ComposeControls::applyDraft(FieldHistoryAction fieldHistoryAction) {
_preview->apply( _preview->apply(
Data::WebPageDraft::FromItem(item), Data::WebPageDraft::FromItem(item),
false); false);
_preview->setDisabled(media && !media->webpage());
} }
return true; return true;
} }
@ -2009,6 +2011,9 @@ void ComposeControls::applyDraft(FieldHistoryAction fieldHistoryAction) {
cancelForward(); cancelForward();
} }
_header->editMessage({}); _header->editMessage({});
if (_preview) {
_preview->setDisabled(false);
}
} }
} }