Don't close EditCaptionBox with changed media by click.
This commit is contained in:
parent
95ea61cd41
commit
653d7aadb1
|
@ -517,7 +517,8 @@ void EditCaptionBox::setInitialText() {
|
||||||
_field->setTextCursor(cursor);
|
_field->setTextCursor(cursor);
|
||||||
|
|
||||||
_checkChangedTimer.setCallback([=] {
|
_checkChangedTimer.setCallback([=] {
|
||||||
if (_field->getTextWithAppliedMarkdown() == _initialText) {
|
if (_field->getTextWithAppliedMarkdown() == _initialText
|
||||||
|
&& _preparedList.files.empty()) {
|
||||||
setCloseByOutsideClick(true);
|
setCloseByOutsideClick(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -738,6 +739,7 @@ bool EditCaptionBox::setPreparedList(Ui::PreparedList &&list) {
|
||||||
const auto wasSpoiler = hasSpoiler();
|
const auto wasSpoiler = hasSpoiler();
|
||||||
_preparedList = std::move(list);
|
_preparedList = std::move(list);
|
||||||
_preparedList.files.front().spoiler = wasSpoiler;
|
_preparedList.files.front().spoiler = wasSpoiler;
|
||||||
|
setCloseByOutsideClick(false);
|
||||||
rebuildPreview();
|
rebuildPreview();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue