mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-23 00:36:53 +00:00
Fixed rescheduling of selected and grouped scheduled messages.
This commit is contained in:
parent
5e1f0e9f7f
commit
de1f222bac
@ -553,11 +553,18 @@ bool AddRescheduleAction(
|
||||
}
|
||||
const auto callback = [=](Api::SendOptions options) {
|
||||
list->cancelSelection();
|
||||
auto groupedIds = std::vector<MessageGroupId>();
|
||||
for (const auto &id : ids) {
|
||||
const auto item = owner->message(id);
|
||||
if (!item || !item->isScheduled()) {
|
||||
continue;
|
||||
}
|
||||
if (const auto groupId = item->groupId()) {
|
||||
if (ranges::contains(groupedIds, groupId)) {
|
||||
continue;
|
||||
}
|
||||
groupedIds.push_back(groupId);
|
||||
}
|
||||
Api::RescheduleMessage(item, options);
|
||||
// Increase the scheduled date by 1s to keep the order.
|
||||
options.scheduled += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user