[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 NotificationsIOS from 'react-native-notifications';
|
||||||
|
|
||||||
|
import reduxStore from '../../lib/createStore';
|
||||||
|
|
||||||
class PushNotification {
|
class PushNotification {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.onRegister = null;
|
this.onRegister = null;
|
||||||
|
@ -11,7 +13,10 @@ class PushNotification {
|
||||||
});
|
});
|
||||||
|
|
||||||
NotificationsIOS.addEventListener('notificationOpened', (notification, completion) => {
|
NotificationsIOS.addEventListener('notificationOpened', (notification, completion) => {
|
||||||
|
const { background } = reduxStore.getState().app;
|
||||||
|
if (background) {
|
||||||
this.onNotification(notification);
|
this.onNotification(notification);
|
||||||
|
}
|
||||||
completion();
|
completion();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue