Fixed crash in rescheduling of scheduled until online messages.

Fixed #8016.
This commit is contained in:
23rd 2020-06-08 09:56:09 +03:00
parent ccce5f081d
commit cf40f92cd5
1 changed files with 6 additions and 1 deletions

View File

@ -430,12 +430,17 @@ bool AddRescheduleMessageAction(
? SendMenuType::ScheduledToUser
: SendMenuType::Scheduled;
using S = Data::ScheduledMessages;
const auto date = (item->date() == S::kScheduledUntilOnlineTimestamp)
? HistoryView::DefaultScheduleTime()
: item->date() + 600;
Ui::show(
HistoryView::PrepareScheduleBox(
&request.navigation->session(),
sendMenuType,
callback,
item->date() + 600),
date),
Ui::LayerOption::KeepOther);
});
return true;