Skip to content

Commit

Permalink
Pause stories if reply context menu is shown.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jul 21, 2023
1 parent 0b5c0e3 commit 2cc0faa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ class ComposeControls final {
[[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(
Expand Down
3 changes: 2 additions & 1 deletion Telegram/SourceFiles/media/stories/media_stories_reply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
4 changes: 0 additions & 4 deletions Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down
2 changes: 1 addition & 1 deletion Telegram/lib_ui

0 comments on commit 2cc0faa

Please sign in to comment.