mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
_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…
Add table
Reference in a new issue