Fix condition

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-03-13 12:43:52 +01:00
parent 3cd56c7b8b
commit 955639215d
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF
2 changed files with 3 additions and 2 deletions

View file

@ -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);

View file

@ -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);
}
}