mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Don't close EditCaptionBox with changed media by click.
This commit is contained in:
parent
95ea61cd41
commit
653d7aadb1
1 changed files with 3 additions and 1 deletions
|
@ -517,7 +517,8 @@ void EditCaptionBox::setInitialText() {
|
|||
_field->setTextCursor(cursor);
|
||||
|
||||
_checkChangedTimer.setCallback([=] {
|
||||
if (_field->getTextWithAppliedMarkdown() == _initialText) {
|
||||
if (_field->getTextWithAppliedMarkdown() == _initialText
|
||||
&& _preparedList.files.empty()) {
|
||||
setCloseByOutsideClick(true);
|
||||
}
|
||||
});
|
||||
|
@ -738,6 +739,7 @@ bool EditCaptionBox::setPreparedList(Ui::PreparedList &&list) {
|
|||
const auto wasSpoiler = hasSpoiler();
|
||||
_preparedList = std::move(list);
|
||||
_preparedList.files.front().spoiler = wasSpoiler;
|
||||
setCloseByOutsideClick(false);
|
||||
rebuildPreview();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue