From 955639215da0054da1722bf5704dd810d38ab1fd Mon Sep 17 00:00:00 2001 From: alperozturk Date: Wed, 13 Mar 2024 12:43:52 +0100 Subject: [PATCH] Fix condition Signed-off-by: alperozturk --- .../java/com/owncloud/android/ui/activity/DrawerActivity.java | 2 +- .../main/java/com/owncloud/android/utils/DrawerMenuUtil.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java index 4c3611e748..158e05953c 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java @@ -366,7 +366,7 @@ public abstract class DrawerActivity extends ToolbarActivity ecosystemApps.findViewById(R.id.drawer_ecosystem_assistant), }; - if (getCapabilities() != null && getCapabilities().getAssistant().isTrue() && !getResources().getBoolean(R.bool.is_branded_client)) { + if (getCapabilities() != null && getCapabilities().getAssistant().isTrue()) { views[3].setVisibility(View.VISIBLE); } else { views[3].setVisibility(View.GONE); diff --git a/app/src/main/java/com/owncloud/android/utils/DrawerMenuUtil.java b/app/src/main/java/com/owncloud/android/utils/DrawerMenuUtil.java index 8c2414b14a..96bd6cd7f4 100644 --- a/app/src/main/java/com/owncloud/android/utils/DrawerMenuUtil.java +++ b/app/src/main/java/com/owncloud/android/utils/DrawerMenuUtil.java @@ -65,7 +65,8 @@ public final class DrawerMenuUtil { } public static void filterAssistantMenuItem(Menu menu, @Nullable OCCapability capability, Resources resources) { - if (capability != null && !capability.getAssistant().isTrue() && resources.getBoolean(R.bool.is_branded_client)) { + boolean showCondition = capability != null && capability.getAssistant().isTrue() && !resources.getBoolean(R.bool.is_branded_client); + if (!showCondition) { filterMenuItems(menu, R.id.nav_assistant); } }