mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Merge pull request #12212 from nextcloud/fix/quota_exceeded_message_uploadlist
Use custom quota exceeded error message in UploadList
This commit is contained in:
commit
6acd893ee1
3 changed files with 10 additions and 2 deletions
|
@ -44,7 +44,8 @@ public enum UploadResult {
|
|||
OLD_ANDROID_API(18),
|
||||
SYNC_CONFLICT(19),
|
||||
CANNOT_CREATE_FILE(20),
|
||||
LOCAL_STORAGE_NOT_COPIED(21);
|
||||
LOCAL_STORAGE_NOT_COPIED(21),
|
||||
QUOTA_EXCEEDED(22);
|
||||
|
||||
private final int value;
|
||||
|
||||
|
@ -104,6 +105,8 @@ public enum UploadResult {
|
|||
return CANNOT_CREATE_FILE;
|
||||
case 21:
|
||||
return LOCAL_STORAGE_NOT_COPIED;
|
||||
case 22:
|
||||
return QUOTA_EXCEEDED;
|
||||
}
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
@ -162,6 +165,8 @@ public enum UploadResult {
|
|||
return VIRUS_DETECTED;
|
||||
case CANNOT_CREATE_FILE:
|
||||
return CANNOT_CREATE_FILE;
|
||||
case QUOTA_EXCEEDED:
|
||||
return QUOTA_EXCEEDED;
|
||||
default:
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
|
|
@ -711,6 +711,9 @@ public class UploadListAdapter extends SectionedRecyclerViewAdapter<SectionedVie
|
|||
case LOCAL_STORAGE_NOT_COPIED:
|
||||
status = parentActivity.getString(R.string.upload_local_storage_not_copied);
|
||||
break;
|
||||
case QUOTA_EXCEEDED:
|
||||
status = parentActivity.getString(R.string.upload_quota_exceeded);
|
||||
break;
|
||||
default:
|
||||
status = parentActivity.getString(R.string.upload_unknown_error);
|
||||
break;
|
||||
|
|
|
@ -467,7 +467,7 @@ public class ExtendedListFragment extends Fragment implements
|
|||
private void scrollToPosition(int position) {
|
||||
LinearLayoutManager linearLayoutManager = (LinearLayoutManager) mRecyclerView.getLayoutManager();
|
||||
|
||||
if (mRecyclerView != null) {
|
||||
if (linearLayoutManager != null) {
|
||||
int visibleItemCount = linearLayoutManager.findLastCompletelyVisibleItemPosition() -
|
||||
linearLayoutManager.findFirstCompletelyVisibleItemPosition();
|
||||
linearLayoutManager.scrollToPositionWithOffset(position, (visibleItemCount / 2) * mHeightCell);
|
||||
|
|
Loading…
Reference in a new issue