Merge pull request #1976 from vector-im/riot_1975

BF: Empty app if initial /sync fails
This commit is contained in:
manuroe
2018-08-17 11:49:17 +00:00
committed by GitHub
3 changed files with 19 additions and 0 deletions
+6
View File
@@ -1,3 +1,9 @@
Changes in 0.7.1 (2018-08-14)
===============================================
Bug fix:
* Empty app if initial /sync fails (#1975).
Changes in 0.7.0 (2018-08-10)
===============================================
+12
View File
@@ -599,6 +599,18 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
}
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
// Check if an initial sync failure occured while the app was in background
MXSession *mainSession = self.mxSessions.firstObject;
if (mainSession.state == MXSessionStateInitialSyncFailed)
{
// Inform the end user why the app appears blank
NSError *error = [NSError errorWithDomain:NSURLErrorDomain
code:NSURLErrorCannotConnectToHost
userInfo:@{NSLocalizedDescriptionKey : NSLocalizedStringFromTable(@"homeserver_connection_lost", @"Vector", nil)}];
[self showErrorAsAlert:error];
}
// Register to GDPR consent not given notification
[self registerUserConsentNotGivenNotification];
+1
View File
@@ -537,6 +537,7 @@
"today" = "Today";
"yesterday" = "Yesterday";
"network_offline_prompt" = "The Internet connection appears to be offline.";
"homeserver_connection_lost" = "Could not connect to the homeserver.";
"public_room_section_title" = "Public Rooms (at %@):";
"bug_report_prompt" = "The application has crashed last time. Would you like to submit a crash report?";
"rage_shake_prompt" = "You seem to be shaking the phone in frustration. Would you like to submit a bug report?";