mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 15:01:57 +03:00
Show "account is disabled" when account is disabled
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
506fd49f3a
commit
da9f2da964
7 changed files with 18 additions and 3 deletions
|
@ -12,7 +12,7 @@ import com.google.gson.annotations.SerializedName
|
|||
import com.owncloud.android.MainApp
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.internal.http.HTTP_OK
|
||||
import java.net.HttpURLConnection.HTTP_OK
|
||||
import java.net.URLEncoder
|
||||
|
||||
class NominatimClient constructor(geocoderBaseUrl: String, email: String) {
|
||||
|
|
|
@ -37,7 +37,8 @@ public enum UploadResult {
|
|||
CANNOT_CREATE_FILE(20),
|
||||
LOCAL_STORAGE_NOT_COPIED(21),
|
||||
QUOTA_EXCEEDED(22),
|
||||
SAME_FILE_CONFLICT(23);
|
||||
SAME_FILE_CONFLICT(23),
|
||||
USER_DISABLED(24);
|
||||
|
||||
private final int value;
|
||||
|
||||
|
@ -101,6 +102,8 @@ public enum UploadResult {
|
|||
return QUOTA_EXCEEDED;
|
||||
case 23:
|
||||
return SAME_FILE_CONFLICT;
|
||||
case 24:
|
||||
return USER_DISABLED;
|
||||
}
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
@ -161,6 +164,8 @@ public enum UploadResult {
|
|||
return CANNOT_CREATE_FILE;
|
||||
case QUOTA_EXCEEDED:
|
||||
return QUOTA_EXCEEDED;
|
||||
case USER_DISABLED:
|
||||
return USER_DISABLED;
|
||||
default:
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
|
|
@ -1372,6 +1372,10 @@ public class FileDisplayActivity extends FileActivity
|
|||
showInfoBox(R.string.maintenance_mode);
|
||||
break;
|
||||
|
||||
case USER_DISABLED:
|
||||
showInfoBox(R.string.disabled_user);
|
||||
break;
|
||||
|
||||
case NO_NETWORK_CONNECTION:
|
||||
showInfoBox(R.string.offline_mode);
|
||||
break;
|
||||
|
|
|
@ -798,6 +798,9 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter<SectionedVie
|
|||
case MAINTENANCE_MODE:
|
||||
status = parentActivity.getString(R.string.maintenance_mode);
|
||||
break;
|
||||
case USER_DISABLED:
|
||||
status = parentActivity.getString(R.string.disabled_user);
|
||||
break;
|
||||
case SSL_RECOVERABLE_PEER_UNVERIFIED:
|
||||
status =
|
||||
parentActivity.getString(
|
||||
|
|
|
@ -430,6 +430,8 @@ public final class ErrorMessageAdapter {
|
|||
} else if (result.getCode() == ResultCode.QUOTA_EXCEEDED) {
|
||||
message = res.getString(R.string.upload_quota_exceeded);
|
||||
|
||||
} else if (result.getCode() == ResultCode.USER_DISABLED) {
|
||||
message = res.getString(R.string.disabled_user);
|
||||
}
|
||||
|
||||
else if (!TextUtils.isEmpty(result.getHttpPhrase())) {
|
||||
|
|
|
@ -642,6 +642,7 @@
|
|||
<string name="confirmation_remove_files_alert">Do you really want to delete the selected items?</string>
|
||||
<string name="confirmation_remove_folders_alert">Do you really want to delete the selected items and their contents?</string>
|
||||
<string name="maintenance_mode">Server is in maintenance mode</string>
|
||||
<string name="disabled_user">Account is disabled</string>
|
||||
<string name="offline_mode">No internet connection</string>
|
||||
<string name="offline_mode_info_title">You\'re Offline, But Work Continues</string>
|
||||
<string name="offline_mode_info_description">Even without an internet connection, you can organize your folders, create files. Once you\'re back online, your pending actions will automatically sync.</string>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
buildscript {
|
||||
ext {
|
||||
androidLibraryVersion ="638326e14bc234ca3285852af461d41e6e08d1aa"
|
||||
androidLibraryVersion ="d46ecea34cec32a0a4cd43a0be7a1aa42ea6bd5b"
|
||||
androidPluginVersion = '8.7.3'
|
||||
androidxMediaVersion = '1.4.1'
|
||||
androidxTestVersion = "1.6.1"
|
||||
|
|
Loading…
Reference in a new issue