Skip to content

Commit ad8c970

Browse files
committed
ios: fix main thread analyser warning on display landing message from inbox
1 parent feb32c4 commit ad8c970

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ios/RNBatch.mm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,10 @@ - (BatchInboxNotificationContent *) findNotificationInList: (NSArray<BatchInboxN
786786
reject(@"InboxError", @"NOTIFICATION_NOT_FOUND", nil);
787787
return;
788788
}
789-
790-
[notification displayLandingMessage];
791-
resolve([NSNull null]);
789+
dispatch_async(dispatch_get_main_queue(), ^{
790+
[notification displayLandingMessage];
791+
resolve([NSNull null]);
792+
});
792793
}
793794

794795
RCT_EXPORT_METHOD(inbox_fetcher_setFilterSilentNotifications:

0 commit comments

Comments
 (0)