From 7b151b2a2e8e29fee1ed415cc4f40a0ce0daaa2f Mon Sep 17 00:00:00 2001 From: Juan Carlos Garrote Date: Wed, 27 Nov 2024 11:52:05 +0100 Subject: [PATCH] feat: hack to show storage information not available message in drawer and manage accounts dialog --- .../android/presentation/accounts/ManageAccountsAdapter.kt | 2 +- .../java/com/owncloud/android/ui/activity/DrawerActivity.kt | 4 ++-- owncloudApp/src/main/res/layout/account_item.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/accounts/ManageAccountsAdapter.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/accounts/ManageAccountsAdapter.kt index 934b0e35152..d693c919293 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/accounts/ManageAccountsAdapter.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/accounts/ManageAccountsAdapter.kt @@ -173,7 +173,7 @@ class ManageAccountsAdapter( DisplayUtils.bytesToHumanReadable(userQuota.getTotal(), context, false) ) } else { // oC10 - quotaText.text = context.getString(R.string.drawer_exceeded_quota) + quotaText.text = context.getString(R.string.drawer_unavailable_used_storage) } } diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.kt index 7f68c85f245..8c8d419390b 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.kt @@ -327,7 +327,7 @@ abstract class DrawerActivity : ToolbarActivity() { userQuota.available == 0L -> { // Exceeded storage. The value is over 100%. getAccountQuotaBar()?.apply { - isVisible = true + isVisible = false progress = 100 progressTintList = ColorStateList.valueOf(resources.getColor(R.color.quota_exceeded)) } @@ -346,7 +346,7 @@ abstract class DrawerActivity : ToolbarActivity() { text = getString(R.string.drawer_exceeded_quota) } } else { // oC10 - getAccountQuotaText()?.text = getString(R.string.drawer_exceeded_quota) + getAccountQuotaText()?.text = getString(R.string.drawer_unavailable_used_storage) getAccountQuotaStatusText()?.visibility = View.GONE } } diff --git a/owncloudApp/src/main/res/layout/account_item.xml b/owncloudApp/src/main/res/layout/account_item.xml index c59fb70eed1..91b0508eb05 100644 --- a/owncloudApp/src/main/res/layout/account_item.xml +++ b/owncloudApp/src/main/res/layout/account_item.xml @@ -146,7 +146,8 @@ android:layout_width="125dp" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/item_file_grid_margin" - android:layout_marginTop="@dimen/standard_quarter_margin" /> + android:layout_marginTop="@dimen/standard_quarter_margin" + android:visibility="gone" />