2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Don't close schedule media box by outside click.

This commit is contained in:
John Preston
2023-11-06 12:47:37 +04:00
parent e98f56b0b7
commit 61a9d9c01d
5 changed files with 12 additions and 12 deletions

View File

@@ -427,6 +427,7 @@ void SendFilesBox::prepare() {
preparePreview();
initPreview();
SetupShadowsToScrollContent(this, _scroll, _inner->heightValue());
setCloseByOutsideClick(false);
boxClosing() | rpl::start_with_next([=] {
if (!_confirmed && _cancelledCallback) {
@@ -1437,7 +1438,12 @@ void SendFilesBox::sendScheduled() {
? SendMenu::Type::ScheduledToUser
: _sendMenuType;
const auto callback = [=](Api::SendOptions options) { send(options); };
_show->showBox(HistoryView::PrepareScheduleBox(this, type, callback));
auto box = HistoryView::PrepareScheduleBox(this, type, callback);
const auto weak = Ui::MakeWeak(box.data());
_show->showBox(std::move(box));
if (const auto strong = weak.data()) {
strong->setCloseByOutsideClick(false);
}
}
void SendFilesBox::sendWhenOnline() {