mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed scrolling to end when media is replaced.
This commit is contained in:
parent
b4a7d98fa0
commit
66926ba25e
3 changed files with 4 additions and 2 deletions
|
@ -392,6 +392,7 @@ void SendConfirmedFile(
|
||||||
action.replyTo = file->to.replyTo;
|
action.replyTo = file->to.replyTo;
|
||||||
action.topicRootId = file->to.topicRootId;
|
action.topicRootId = file->to.topicRootId;
|
||||||
action.generateLocal = true;
|
action.generateLocal = true;
|
||||||
|
action.replaceMediaOf = file->to.replaceMediaOf;
|
||||||
session->api().sendAction(action);
|
session->api().sendAction(action);
|
||||||
|
|
||||||
auto caption = TextWithEntities{
|
auto caption = TextWithEntities{
|
||||||
|
|
|
@ -3055,7 +3055,7 @@ void ApiWrap::sharedMediaDone(
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApiWrap::sendAction(const SendAction &action) {
|
void ApiWrap::sendAction(const SendAction &action) {
|
||||||
if (!action.options.scheduled) {
|
if (!action.options.scheduled && !action.replaceMediaOf) {
|
||||||
const auto topic = action.topicRootId
|
const auto topic = action.topicRootId
|
||||||
? action.history->peer->forumTopicFor(action.topicRootId)
|
? action.history->peer->forumTopicFor(action.topicRootId)
|
||||||
: nullptr;
|
: nullptr;
|
||||||
|
|
|
@ -853,7 +853,8 @@ HistoryWidget::HistoryWidget(
|
||||||
const auto lastKeyboardUsed = lastForceReplyReplied(FullMsgId(
|
const auto lastKeyboardUsed = lastForceReplyReplied(FullMsgId(
|
||||||
action.history->peer->id,
|
action.history->peer->id,
|
||||||
action.replyTo));
|
action.replyTo));
|
||||||
if (action.options.scheduled) {
|
if (action.replaceMediaOf) {
|
||||||
|
} else if (action.options.scheduled) {
|
||||||
cancelReply(lastKeyboardUsed);
|
cancelReply(lastKeyboardUsed);
|
||||||
crl::on_main(this, [=, history = action.history] {
|
crl::on_main(this, [=, history = action.history] {
|
||||||
controller->showSection(
|
controller->showSection(
|
||||||
|
|
Loading…
Add table
Reference in a new issue