From 7a5f4e8a0131663086f2c62c281ed53586ca5fba Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 8 Jun 2020 12:02:43 +0400 Subject: [PATCH] Fix crashes in EditCaptionBox and dropdown. --- Telegram/SourceFiles/boxes/edit_caption_box.cpp | 8 ++++---- Telegram/lib_ui | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/boxes/edit_caption_box.cpp b/Telegram/SourceFiles/boxes/edit_caption_box.cpp index 78057584c..bc734d962 100644 --- a/Telegram/SourceFiles/boxes/edit_caption_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_caption_box.cpp @@ -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(); diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 05d1ee379..dbcb6a35b 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 05d1ee3796b878f18af87b3684aef4ff142f9d5c +Subproject commit dbcb6a35b0cf47bac83d596a239a61b0084f9f4c