Show maintenance mode error in notifications while uploading a file

# Conflicts:
#	build.gradle
#	res/values/strings.xml
This commit is contained in:
davigonz 2016-12-23 10:47:05 +01:00 committed by AndyScherzinger
parent 45d305afd6
commit ad6d867971
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
4 changed files with 6 additions and 2 deletions

View file

@ -323,6 +323,7 @@ public class UploadFileOperation extends SyncOperation {
remoteParentPath = remoteParentPath.endsWith(OCFile.PATH_SEPARATOR) ?
remoteParentPath : remoteParentPath + OCFile.PATH_SEPARATOR;
result = grantFolderExistence(remoteParentPath, client);
if (!result.isSuccess()) {
return result;

View file

@ -74,6 +74,4 @@ public class NotificationUtils {
}, delayInMillis);
}
}

View file

@ -85,6 +85,9 @@ public class ErrorMessageAdapter {
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
message = res.getString(R.string.filename_forbidden_charaters_from_server);
} else if (result.getCode() == ResultCode.MAINTENANCE_MODE) {
message = res.getString(R.string.maintenance_mode);
} else {
message = String.format(
res.getString(R.string.uploader_upload_failed_content_single),

View file

@ -543,6 +543,8 @@
<string name="local_file_not_found_toast">File not found in local file system</string>
<string name="confirmation_remove_files_alert">Do you really want to remove the selected items?</string>
<string name="confirmation_remove_folders_alert">Do you really want to remove the selected items and their contents?</string>
<string name="maintenance_mode">This Owncloud instance is in maintenance mode, so it may take a while.</string>
<string name="uploads_view_upload_status_waiting_for_charging">Awaiting charge</string>
<string name="actionbar_search">Search</string>
<string name="files_drop_not_supported">This is a Nextcloud feature, please update.</string>