mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +02:00
Fixed rescheduling of selected and grouped scheduled messages.
This commit is contained in:
parent
5e1f0e9f7f
commit
de1f222bac
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue