Skip to content

Commit

Permalink
chore(messaging, ios): correct variable naming of native (#13429)
Browse files Browse the repository at this point in the history
* fix(messaging, ios): correct variable naming

* fix(messaging, ios): correct variable naming
  • Loading branch information
StanleyCocos authored Oct 2, 2024
1 parent d770aa6 commit ee123b0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ @implementation FLTFirebaseMessagingPlugin {
BOOL _initialNotificationGathered;
FLTFirebaseMethodCallResult *_initialNotificationResult;

NSString *_initialNoticationID;
NSString *_initialNotificationID;
NSString *_notificationOpenedAppID;

#ifdef __FF_NOTIFICATIONS_SUPPORTED_PLATFORM
Expand Down Expand Up @@ -220,7 +220,7 @@ - (void)application_onDidFinishLaunchingNotification:(nonnull NSNotification *)n
// If remoteNotification exists, it is the notification that opened the app.
_initialNotification =
[FLTFirebaseMessagingPlugin remoteMessageUserInfoToDict:remoteNotification];
_initialNoticationID = remoteNotification[@"gcm.message_id"];
_initialNotificationID = remoteNotification[@"gcm.message_id"];
}
_initialNotificationGathered = YES;
[self initialNotificationCallback];
Expand Down Expand Up @@ -357,7 +357,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
// We only want to handle FCM notifications and stop firing `onMessageOpenedApp()` when app is
// coming from a terminated state.
if (_notificationOpenedAppID != nil &&
![_initialNoticationID isEqualToString:_notificationOpenedAppID]) {
![_initialNotificationID isEqualToString:_notificationOpenedAppID]) {
NSDictionary *notificationDict =
[FLTFirebaseMessagingPlugin remoteMessageUserInfoToDict:remoteNotification];
[_channel invokeMethod:@"Messaging#onMessageOpenedApp" arguments:notificationDict];
Expand Down Expand Up @@ -1036,7 +1036,7 @@ - (nullable NSDictionary *)copyInitialNotification {
// Only return if initial notification was sent when app is terminated. Also ensure that
// it was the initial notification that was tapped to open the app.
if (_initialNotification != nil &&
[_initialNoticationID isEqualToString:_notificationOpenedAppID]) {
[_initialNotificationID isEqualToString:_notificationOpenedAppID]) {
NSDictionary *initialNotificationCopy = [_initialNotification copy];
_initialNotification = nil;
return initialNotificationCopy;
Expand Down

0 comments on commit ee123b0

Please sign in to comment.