Warn about changing notification schedule date

This commit is contained in:
Dariusz Luksza 2018-07-11 17:39:32 +02:00
parent 11ccbb42f6
commit 9144314eac
1 changed files with 1 additions and 0 deletions

View File

@ -361,6 +361,7 @@ public class RNFirebaseNotificationManager {
// If fireDate you specify is in the past, the alarm triggers immediately.
// So we need to adjust the time for correct operation.
if (fireDate < System.currentTimeMillis()) {
Log.w(TAG, "Scheduled notification date is in the past, will adjust it to be in future");
Calendar newFireDate = Calendar.getInstance();
Calendar currentFireDate = Calendar.getInstance();
currentFireDate.setTimeInMillis(fireDate);