File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -101,10 +101,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
101101 [self prepareScreenProtection ];
102102
103103 // Avoid blocking app launch by putting all possible DB access in async thread.
104+ UIApplicationState launchState = application.applicationState ;
104105 [TSAccountManager runIfRegistered: ^{
105- if (application.applicationState == UIApplicationStateInactive) {
106+ if (launchState == UIApplicationStateInactive) {
107+ DDLogWarn (@" The app was launched from inactive" );
106108 [TSSocketManager becomeActiveFromForeground ];
107- } else if (application.applicationState == UIApplicationStateBackground) {
109+ } else if (launchState == UIApplicationStateBackground) {
110+ DDLogWarn (@" The app was launched from being backgrounded" );
108111 [TSSocketManager becomeActiveFromBackgroundExpectMessage: NO ];
109112 } else {
110113 DDLogWarn (@" The app was launched in an unknown way" );
You can’t perform that action at this time.
0 commit comments