You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Prevent scheduling of local notifications in the past on iOS (check was already present on Android).
#rb [at]Peter.Sauerbrei, [at]Mathieu.Roy
#rnx
#ROBOMERGE-SOURCE: CL 8576758 via CL 8576774 via CL 8616299
#ROBOMERGE-BOT: (v409-8614070)
[CL 8627823 by francois guimond in Main branch]
This commit is contained in:
@@ -142,6 +142,11 @@ static int32 NotificationNumber = 0;
|
||||
int32 FIOSLocalNotificationService::ScheduleLocalNotificationAtTime(const FDateTime& FireDateTime, bool LocalTime, const FText& Title, const FText& Body, const FText& Action, const FString& ActivationEvent)
|
||||
{
|
||||
#if !PLATFORM_TVOS
|
||||
if (FireDateTime < (LocalTime ? FDateTime::Now() : FDateTime::UtcNow()))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Create local copies of these for the block to capture
|
||||
FDateTime FireDateTimeCopy = FireDateTime;
|
||||
FText TitleCopy = Title;
|
||||
@@ -173,6 +178,11 @@ int32 FIOSLocalNotificationService::ScheduleLocalNotificationAtTime(const FDateT
|
||||
int32 FIOSLocalNotificationService::ScheduleLocalNotificationBadgeAtTime(const FDateTime& FireDateTime, bool LocalTime, const FString& ActivationEvent)
|
||||
{
|
||||
#if !PLATFORM_TVOS
|
||||
if (FireDateTime < (LocalTime ? FDateTime::Now() : FDateTime::UtcNow()))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
FDateTime FireDateTimeCopy = FireDateTime;
|
||||
FString ActivationEventCopy = ActivationEvent;
|
||||
int32 CurrentNotificationId = NotificationNumber++;
|
||||
|
||||
Reference in New Issue
Block a user