mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 22:50:20 +08:00
Warn about changing notification schedule date
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user