diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index 7f38a44658..09485157bf 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -580,9 +580,6 @@ - (void)applicationDidBecomeActive:(UIApplication *)application } [self handleLaunchAnimation]; - - // Check if we need to display a key share dialog - [self checkPendingRoomKeyRequests]; } - (void)applicationWillTerminate:(UIApplication *)application @@ -1934,6 +1931,14 @@ - (void)initMatrixSessions } } } + else if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateActive) + { + if (mxSession.state == MXSessionStateRunning) + { + // Check if we need to display a key share dialog + [self checkPendingRoomKeyRequests]; + } + } [self handleLaunchAnimation]; }];