2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

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) {
_asFile = checked;
}, _wayWrap->lifetime());
if (_animated) {
prepareStreamedPreview();
}
}
EditCaptionBox::~EditCaptionBox() = default;
@@ -590,6 +586,10 @@ void EditCaptionBox::createEditMediaButton() {
}
void EditCaptionBox::prepare() {
if (_animated) {
prepareStreamedPreview();
}
addButton(tr::lng_settings_save(), [this] { save(); });
if (_isAllowedEditMedia) {
createEditMediaButton();