mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Fixed section scrolling above voice recording lock.
This commit is contained in:
parent
5f9e497d38
commit
7b837e5138
7 changed files with 28 additions and 0 deletions
|
@ -815,6 +815,11 @@ void HistoryWidget::initVoiceRecordBar() {
|
||||||
updateSendButtonType();
|
updateSendButtonType();
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
|
_voiceRecordBar->lockViewportEvents(
|
||||||
|
) | rpl::start_with_next([=](not_null<QEvent*> e) {
|
||||||
|
_scroll->viewportEvent(e);
|
||||||
|
}, lifetime());
|
||||||
|
|
||||||
_voiceRecordBar->hideFast();
|
_voiceRecordBar->hideFast();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2122,6 +2122,10 @@ rpl::producer<bool> ComposeControls::lockShowStarts() const {
|
||||||
return _voiceRecordBar->lockShowStarts();
|
return _voiceRecordBar->lockShowStarts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpl::producer<not_null<QEvent*>> ComposeControls::viewportEvents() const {
|
||||||
|
return _voiceRecordBar->lockViewportEvents();
|
||||||
|
}
|
||||||
|
|
||||||
bool ComposeControls::isRecording() const {
|
bool ComposeControls::isRecording() const {
|
||||||
return _voiceRecordBar->isRecording();
|
return _voiceRecordBar->isRecording();
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,7 @@ public:
|
||||||
[[nodiscard]] rpl::producer<not_null<QKeyEvent*>> keyEvents() const;
|
[[nodiscard]] rpl::producer<not_null<QKeyEvent*>> keyEvents() const;
|
||||||
[[nodiscard]] rpl::producer<InlineChosen> inlineResultChosen() const;
|
[[nodiscard]] rpl::producer<InlineChosen> inlineResultChosen() const;
|
||||||
[[nodiscard]] rpl::producer<SendActionUpdate> sendActionUpdates() const;
|
[[nodiscard]] rpl::producer<SendActionUpdate> sendActionUpdates() const;
|
||||||
|
[[nodiscard]] rpl::producer<not_null<QEvent*>> viewportEvents() const;
|
||||||
|
|
||||||
using MimeDataHook = Fn<bool(
|
using MimeDataHook = Fn<bool(
|
||||||
not_null<const QMimeData*> data,
|
not_null<const QMimeData*> data,
|
||||||
|
|
|
@ -1433,6 +1433,13 @@ rpl::producer<bool> VoiceRecordBar::lockShowStarts() const {
|
||||||
return _lockShowing.changes();
|
return _lockShowing.changes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpl::producer<not_null<QEvent*>> VoiceRecordBar::lockViewportEvents() const {
|
||||||
|
return _lock->events(
|
||||||
|
) | rpl::filter([=](not_null<QEvent*> e) {
|
||||||
|
return e->type() == QEvent::Wheel;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
rpl::producer<> VoiceRecordBar::updateSendButtonTypeRequests() const {
|
rpl::producer<> VoiceRecordBar::updateSendButtonTypeRequests() const {
|
||||||
return _listenChanges.events();
|
return _listenChanges.events();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ public:
|
||||||
[[nodiscard]] rpl::producer<VoiceToSend> sendVoiceRequests() const;
|
[[nodiscard]] rpl::producer<VoiceToSend> sendVoiceRequests() const;
|
||||||
[[nodiscard]] rpl::producer<bool> recordingStateChanges() const;
|
[[nodiscard]] rpl::producer<bool> recordingStateChanges() const;
|
||||||
[[nodiscard]] rpl::producer<bool> lockShowStarts() const;
|
[[nodiscard]] rpl::producer<bool> lockShowStarts() const;
|
||||||
|
[[nodiscard]] rpl::producer<not_null<QEvent*>> lockViewportEvents() const;
|
||||||
[[nodiscard]] rpl::producer<> updateSendButtonTypeRequests() const;
|
[[nodiscard]] rpl::producer<> updateSendButtonTypeRequests() const;
|
||||||
|
|
||||||
void requestToSendWithOptions(Api::SendOptions options);
|
void requestToSendWithOptions(Api::SendOptions options);
|
||||||
|
|
|
@ -531,6 +531,11 @@ void RepliesWidget::setupComposeControls() {
|
||||||
updateScrollDownVisibility();
|
updateScrollDownVisibility();
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
|
_composeControls->viewportEvents(
|
||||||
|
) | rpl::start_with_next([=](not_null<QEvent*> e) {
|
||||||
|
_scroll->viewportEvent(e);
|
||||||
|
}, lifetime());
|
||||||
|
|
||||||
_composeControls->finishAnimating();
|
_composeControls->finishAnimating();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -266,6 +266,11 @@ void ScheduledWidget::setupComposeControls() {
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
updateScrollDownVisibility();
|
updateScrollDownVisibility();
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
|
_composeControls->viewportEvents(
|
||||||
|
) | rpl::start_with_next([=](not_null<QEvent*> e) {
|
||||||
|
_scroll->viewportEvent(e);
|
||||||
|
}, lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScheduledWidget::chooseAttach() {
|
void ScheduledWidget::chooseAttach() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue