2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Update API scheme on layer 148: Drafts in topics.

This commit is contained in:
John Preston
2022-10-17 20:29:48 +04:00
parent 791addd0ee
commit 89d0a71591
60 changed files with 861 additions and 541 deletions

View File

@@ -555,12 +555,14 @@ bool MainWidget::shareUrl(
QFIXED_MAX
};
const auto history = peer->owner().history(peer);
const auto topicRootId = 0;
history->setLocalDraft(std::make_unique<Data::Draft>(
textWithTags,
0,
0, // replyTo
topicRootId,
cursor,
Data::PreviewState::Allowed));
history->clearLocalEditDraft();
history->clearLocalEditDraft(topicRootId);
history->session().changes().historyUpdated(
history,
Data::HistoryUpdate::Flag::LocalDraftSet);
@@ -587,12 +589,14 @@ bool MainWidget::inlineSwitchChosen(
int(botAndQuery.size()),
QFIXED_MAX
};
const auto topicRootId = 0;
h->setLocalDraft(std::make_unique<Data::Draft>(
textWithTags,
0,
0, // replyTo
topicRootId,
cursor,
Data::PreviewState::Allowed));
h->clearLocalEditDraft();
h->clearLocalEditDraft(topicRootId);
h->session().changes().historyUpdated(
h,
Data::HistoryUpdate::Flag::LocalDraftSet);