Skip to content

Commit

Permalink
fix(messaging, android): avoid using rn61+ symbol
Browse files Browse the repository at this point in the history
this should be the inline equivalent of the rn61 symbol I added
in invertase#5236 - accidentally breaking react-native 0.60 compatibility
  • Loading branch information
mikehardy committed May 12, 2021
1 parent 67b3a61 commit 3c358e3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.bridge.WritableNativeMap;
import com.google.android.gms.tasks.Tasks;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.messaging.FirebaseMessaging;
Expand Down Expand Up @@ -231,7 +232,9 @@ public void onNewIntent(Intent intent) {

if (remoteMessageMap != null) {
// WritableNativeMap not be consumed twice. But it is resolved in future and in event below. Make a copy - issue #5231
initialNotification = remoteMessageMap.copy();
WritableNativeMap newInitialNotification = new WritableNativeMap();
newInitialNotification.merge(remoteMessageMap);
initialNotification = newInitialNotification;
ReactNativeFirebaseMessagingReceiver.notifications.remove(messageId);

ReactNativeFirebaseEventEmitter emitter = ReactNativeFirebaseEventEmitter.getSharedInstance();
Expand Down

0 comments on commit 3c358e3

Please sign in to comment.