File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Ports/iOSPort/nativeSources Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -418,17 +418,12 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNot
418418
419419- (void )userNotificationCenter : (UNUserNotificationCenter *)center didReceiveNotificationResponse : (UNNotificationResponse *)response withCompletionHandler : (void (^)())completionHandler {
420420#ifdef CN1_INCLUDE_NOTIFICATIONS
421- UIApplicationState state = [[UIApplication sharedApplication ] applicationState ];
422- if (state == UIApplicationStateActive)
421+ if ( [response.notification.request.content.userInfo valueForKey: @" __ios_id__" ] != NULL )
423422 {
424- if ( [response.notification.request.content.userInfo valueForKey: @" __ios_id__" ] != NULL )
425- {
426- CN1Log (@" Received local notification while running: %@ " , response.notification );
427-
428- NSString * alertValue = [response.notification.request.content.userInfo valueForKey: @" __ios_id__" ];
429- if ([response.notification.request.content.userInfo valueForKey: @" foreground" ] != NULL )
430- com_codename1_impl_ios_IOSImplementation_localNotificationReceived___java_lang_String (CN1_THREAD_GET_STATE_PASS_ARG fromNSString (CN1_THREAD_GET_STATE_PASS_ARG alertValue));
431- }
423+ CN1Log (@" Received local notification while running: %@ " , response.notification );
424+ NSString * alertValue = [response.notification.request.content.userInfo valueForKey: @" __ios_id__" ];
425+ if ([response.notification.request.content.userInfo valueForKey: @" foreground" ] != NULL )
426+ com_codename1_impl_ios_IOSImplementation_localNotificationReceived___java_lang_String (CN1_THREAD_GET_STATE_PASS_ARG fromNSString (CN1_THREAD_GET_STATE_PASS_ARG alertValue));
432427 }
433428#endif
434429#ifdef INCLUDE_CN1_PUSH
You can’t perform that action at this time.
0 commit comments