From b8d9848e6d4e3d346bd06fb7d6780bf324165cab Mon Sep 17 00:00:00 2001
From: Diego Mello <diegolmello@gmail.com>
Date: Fri, 9 Aug 2019 14:03:15 -0300
Subject: [PATCH] [FIX] Endless "connecting" on notification tap (#1121)

---
 app/notifications/push/push.ios.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/notifications/push/push.ios.js b/app/notifications/push/push.ios.js
index 277239a15..752eae69c 100644
--- a/app/notifications/push/push.ios.js
+++ b/app/notifications/push/push.ios.js
@@ -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();
 		});
 
-- 
GitLab