Console: APNS - SYIOS-75 - Jump to the concerned room only if the app is transitioning from the background

This commit is contained in:
giomfo 2015-02-19 18:23:24 +01:00
parent f10e1da97b
commit 0f93cbcd41

View file

@ -257,10 +257,13 @@
completionHandler(UIBackgroundFetchResultNoData); completionHandler(UIBackgroundFetchResultNoData);
// Look for the room id // Jump to the concerned room only if the app is transitioning from the background
NSString* roomId = [userInfo objectForKey:@"room_id"]; if ([UIApplication sharedApplication].applicationState == UIApplicationStateInactive) {
if (roomId.length) { // Look for the room id
[self.masterTabBarController showRoom:roomId]; NSString* roomId = [userInfo objectForKey:@"room_id"];
if (roomId.length) {
[self.masterTabBarController showRoom:roomId];
}
} }
} }