diff --git a/Examples/firebase-migration/app/App.js b/Examples/firebase-migration/app/App.js index 74b70d552383b13c395af80c6a6a6ddf8263317c..04bbd946193aa2ac9d58e4fabe01866ddfd93307 100644 --- a/Examples/firebase-migration/app/App.js +++ b/Examples/firebase-migration/app/App.js @@ -98,8 +98,7 @@ class MainPage extends Component { .setBody("Force touch to reply") .setSound("bell.mp3") .setData({ - key1: 'value1', - key2: 'value2' + now: new Date().toISOString() }); notification.ios.badge = 10 notification.android.setAutoCancel(true); @@ -125,8 +124,7 @@ class MainPage extends Component { .setBody("Force touch to reply") .setSound("bell.mp3") .setData({ - key1: 'value1', - key2: 'value2' + now: new Date().toISOString() }); notification.android.setChannelId("test-channel") notification.android.setPriority(firebase.notifications.Android.Priority.High) diff --git a/Examples/firebase-migration/app/Listeners.js b/Examples/firebase-migration/app/Listeners.js index c13f8f3e366b56c4efe94a1a60060e6adf6938ea..d03e2fb5c88ec85c030a4636727a8fcb9c754d81 100644 --- a/Examples/firebase-migration/app/Listeners.js +++ b/Examples/firebase-migration/app/Listeners.js @@ -15,8 +15,8 @@ function displayNotificationFromCustomData(message: RemoteMessage){ } } -export function registerKilledListener(message: RemoteMessage){ - AsyncStorage.setItem('lastNotification', JSON.stringify(message.data)); +export async function registerKilledListener(message: RemoteMessage){ + await AsyncStorage.setItem('lastNotification', JSON.stringify(message.data)); displayNotificationFromCustomData(); }