[FIX] Endless "connecting" on notification tap (#1121)
This commit is contained in:
parent
2d3894ccb2
commit
b8d9848e6d
|
@ -1,5 +1,7 @@
|
|||
import NotificationsIOS from 'react-native-notifications';
|
||||
|
||||
import reduxStore from '../../lib/createStore';
|
||||
|
||||
class PushNotification {
|
||||
constructor() {
|
||||
this.onRegister = null;
|
||||
|
@ -11,7 +13,10 @@ class PushNotification {
|
|||
});
|
||||
|
||||
NotificationsIOS.addEventListener('notificationOpened', (notification, completion) => {
|
||||
this.onNotification(notification);
|
||||
const { background } = reduxStore.getState().app;
|
||||
if (background) {
|
||||
this.onNotification(notification);
|
||||
}
|
||||
completion();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue