Pause stories if reply context menu is shown.

This commit is contained in:
John Preston 2023-07-21 17:11:49 +04:00
parent 0b5c0e3e98
commit 2cc0faa5b3
5 changed files with 8 additions and 6 deletions

View File

@ -2978,6 +2978,10 @@ rpl::producer<bool> ComposeControls::hasSendTextValue() const {
return _hasSendText.value();
}
rpl::producer<bool> ComposeControls::fieldMenuShownValue() const {
return _field->menuShownValue();
}
bool ComposeControls::preventsClose(Fn<void()> &&continueCallback) const {
if (_voiceRecordBar->isActive()) {
_voiceRecordBar->showDiscardBox(std::move(continueCallback));

View File

@ -220,6 +220,7 @@ public:
[[nodiscard]] bool isRecordingPressed() const;
[[nodiscard]] rpl::producer<bool> recordingActiveValue() const;
[[nodiscard]] rpl::producer<bool> hasSendTextValue() const;
[[nodiscard]] rpl::producer<bool> fieldMenuShownValue() const;
void applyCloudDraft();
void applyDraft(

View File

@ -673,8 +673,9 @@ rpl::producer<bool> ReplyArea::activeValue() const {
_controls->focusedValue(),
_controls->recordingActiveValue(),
_controls->tabbedPanelShownValue(),
_controls->fieldMenuShownValue(),
_choosingAttach.value(),
_1 || _2 || _3 || _4
_1 || _2 || _3 || _4 || _5
) | rpl::distinct_until_changed();
}

View File

@ -486,10 +486,6 @@ OverlayWidget::OverlayWidget()
return base::EventFilterResult::Cancel;
} else if (type == QEvent::ThemeChange && Platform::IsLinux()) {
_window->setWindowIcon(Window::CreateIcon(_session));
} else if (type == QEvent::FocusOut) {
if (const auto popup = QApplication::activePopupWidget()) {
int a = popup->x();
}
}
return base::EventFilterResult::Continue;
});

@ -1 +1 @@
Subproject commit 39d440f774b5b0986200299c4893e3f6a4678c85
Subproject commit 079d966e45922f90de297fc9f7435cbf8b127b09