Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 3b67767

Browse files
author
Sebastian Pernett
committed
fix(ios): foreground notification property
check if react native's app state is unknown to verify if app came from background
1 parent 092d556 commit 3b67767

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,8 @@ Notifications._transformNotificationObject = function(data, isFromBackground = n
351351
if ( isFromBackground === null ) {
352352
isFromBackground = (
353353
data.foreground === false ||
354-
AppState.currentState === 'background'
354+
AppState.currentState === 'background' ||
355+
AppState.currentState === 'unknown'
355356
);
356357
}
357358

0 commit comments

Comments
 (0)