Merge pull request #2832 from nextcloud/showMaintenanceInfo

Show offline info
This commit is contained in:
Andy Scherzinger 2018-07-18 17:44:49 +02:00 committed by GitHub
commit df8d8aef35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -289,9 +289,6 @@ public class RefreshFolderOperation extends RemoteOperation {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
removeLocalFolder();
}
if (result.getCode() == ResultCode.MAINTENANCE_MODE) {
return result;
}
if (result.isException()) {
Log_OC.e(TAG, "Checked " + mAccount.name + remotePath + " : " +
result.getLogMessage(), result.getException());

View file

@ -1348,6 +1348,9 @@ public class FileDisplayActivity extends HookActivity
showUntrustedCertDialog(synchResult);
} else if (ResultCode.MAINTENANCE_MODE.equals(synchResult.getCode())) {
showInfoBox(R.string.maintenance_mode);
} else if (ResultCode.NO_NETWORK_CONNECTION.equals(synchResult.getCode()) ||
ResultCode.HOST_NOT_AVAILABLE.equals(synchResult.getCode())) {
showInfoBox(R.string.offline_mode);
}
}
}