mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Merge pull request #3574 from nextcloud/serverUnavailable
Server unavailable
This commit is contained in:
commit
db96ceec25
2 changed files with 23 additions and 9 deletions
|
@ -1411,14 +1411,28 @@ public class FileDisplayActivity extends HookActivity
|
|||
// TODO refactor and make common
|
||||
if (checkForRemoteOperationError(synchResult)) {
|
||||
requestCredentialsUpdate(context);
|
||||
} else if (RemoteOperationResult.ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED.equals(
|
||||
synchResult.getCode())) {
|
||||
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);
|
||||
} else {
|
||||
switch (synchResult.getCode()) {
|
||||
case SSL_RECOVERABLE_PEER_UNVERIFIED:
|
||||
showUntrustedCertDialog(synchResult);
|
||||
break;
|
||||
|
||||
case MAINTENANCE_MODE:
|
||||
showInfoBox(R.string.maintenance_mode);
|
||||
break;
|
||||
|
||||
case NO_NETWORK_CONNECTION:
|
||||
showInfoBox(R.string.offline_mode);
|
||||
break;
|
||||
|
||||
case HOST_NOT_AVAILABLE:
|
||||
showInfoBox(R.string.host_not_available);
|
||||
break;
|
||||
|
||||
default:
|
||||
// nothing to do
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -826,7 +826,6 @@
|
|||
<string name="no_pdf_app_available">No App available to handle PDF</string>
|
||||
<string name="share_via_link_hide_download">Hide download</string>
|
||||
<string name="unread_comments">Unread comments exist</string>
|
||||
|
||||
<string name="richdocuments_failed_to_load_document">Failed to load document!</string>
|
||||
<string name="create_new_document">Create new document</string>
|
||||
<string name="create_new_spreadsheet">Create new spreadsheet</string>
|
||||
|
@ -854,5 +853,6 @@
|
|||
<string name="upload_sync_conflict">Sync conflict, please resolve manually</string>
|
||||
<string name="upload_cannot_create_file">Cannot create local file</string>
|
||||
<string name="upload_local_storage_not_copied">File could not be copied to local storage</string>
|
||||
<string name="host_not_available">Server not available</string>
|
||||
<string name="delete_entries">Delete entries</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue