mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Limited maximum number of selected messages for rescheduling to 20.
This commit is contained in:
parent
f2b434d82b
commit
776c099a25
1 changed files with 5 additions and 1 deletions
|
@ -57,6 +57,7 @@ namespace {
|
|||
|
||||
// If we can't cloud-export link for such time we export it locally.
|
||||
constexpr auto kExportLocalTimeout = crl::time(1000);
|
||||
constexpr auto kRescheduleLimit = 20;
|
||||
|
||||
//void AddToggleGroupingAction( // #feed
|
||||
// not_null<Ui::PopupMenu*> menu,
|
||||
|
@ -458,6 +459,9 @@ bool AddRescheduleAction(
|
|||
if (!request.overSelection || request.selectedItems.empty()) {
|
||||
return false;
|
||||
}
|
||||
if (request.selectedItems.size() > kRescheduleLimit) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}();
|
||||
if (!goodSingle && !goodMany) {
|
||||
|
@ -492,7 +496,7 @@ bool AddRescheduleAction(
|
|||
options.removeWebPageId = true;
|
||||
}
|
||||
Api::RescheduleMessage(item, options);
|
||||
// Increase the scheduled date by 1ms to keep the order.
|
||||
// Increase the scheduled date by 1s to keep the order.
|
||||
options.scheduled += 1;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue