Fix crashes in EditCaptionBox and dropdown.

This commit is contained in:
John Preston 2020-06-08 12:02:43 +04:00
parent cf40f92cd5
commit 7a5f4e8a01
2 changed files with 5 additions and 5 deletions

View File

@ -327,10 +327,6 @@ EditCaptionBox::EditCaptionBox(
) | rpl::start_with_next([&](bool checked) { ) | rpl::start_with_next([&](bool checked) {
_asFile = checked; _asFile = checked;
}, _wayWrap->lifetime()); }, _wayWrap->lifetime());
if (_animated) {
prepareStreamedPreview();
}
} }
EditCaptionBox::~EditCaptionBox() = default; EditCaptionBox::~EditCaptionBox() = default;
@ -590,6 +586,10 @@ void EditCaptionBox::createEditMediaButton() {
} }
void EditCaptionBox::prepare() { void EditCaptionBox::prepare() {
if (_animated) {
prepareStreamedPreview();
}
addButton(tr::lng_settings_save(), [this] { save(); }); addButton(tr::lng_settings_save(), [this] { save(); });
if (_isAllowedEditMedia) { if (_isAllowedEditMedia) {
createEditMediaButton(); createEditMediaButton();

@ -1 +1 @@
Subproject commit 05d1ee3796b878f18af87b3684aef4ff142f9d5c Subproject commit dbcb6a35b0cf47bac83d596a239a61b0084f9f4c