mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-10-18 00:15:26 +02:00
Added event for scrolling to bottom to compose controls.
This commit is contained in:
parent
313ae0f86c
commit
f84181e7a5
2 changed files with 12 additions and 0 deletions
|
@ -1180,6 +1180,17 @@ auto ComposeControls::sendContentRequests(SendRequestType requestType) const {
|
|||
_sendCustomRequests.events());
|
||||
}
|
||||
|
||||
rpl::producer<> ComposeControls::scrollToMaxRequests() const {
|
||||
return _field->submits() | rpl::filter([=]{
|
||||
if (_mode == Mode::Normal
|
||||
&& !_voiceRecordBar->isListenState()
|
||||
&& getTextWithAppliedMarkdown().text.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}) | rpl::to_empty;
|
||||
}
|
||||
|
||||
rpl::producer<Api::SendOptions> ComposeControls::sendRequests() const {
|
||||
return sendContentRequests(SendRequestType::Text);
|
||||
}
|
||||
|
|
|
@ -183,6 +183,7 @@ public:
|
|||
-> rpl::producer<ReplyNextRequest>;
|
||||
[[nodiscard]] rpl::producer<> focusRequests() const;
|
||||
[[nodiscard]] rpl::producer<> showScheduledRequests() const;
|
||||
[[nodiscard]] rpl::producer<> scrollToMaxRequests() const;
|
||||
|
||||
using MimeDataHook = Fn<bool(
|
||||
not_null<const QMimeData*> data,
|
||||
|
|
Loading…
Add table
Reference in a new issue