diff --git a/app/src/main/java/com/nextcloud/ui/composeActivity/ComposeActivity.kt b/app/src/main/java/com/nextcloud/ui/composeActivity/ComposeActivity.kt index b70fb8c1bf..0ccd6fb787 100644 --- a/app/src/main/java/com/nextcloud/ui/composeActivity/ComposeActivity.kt +++ b/app/src/main/java/com/nextcloud/ui/composeActivity/ComposeActivity.kt @@ -84,6 +84,9 @@ class ComposeActivity : DrawerActivity() { } if (destination == ComposeDestination.AssistantScreen) { + val assistantMenuItem = binding.bottomNavigation.menu.findItem(R.id.nav_assistant) + assistantMenuItem.setChecked(true) + nextcloudClient?.let { client -> AssistantScreen( viewModel = AssistantViewModel( 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 5caee6ea36..217c9edffb 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 @@ -262,9 +262,10 @@ public abstract class DrawerActivity extends ToolbarActivity if (this instanceof FileDisplayActivity fda) { fda.browseToRoot(); } + EventBus.getDefault().post(new ChangeMenuEvent()); } else if (menuItemId == R.id.nav_favorites) { handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.FAVORITE_SEARCH), menuItemId); - } else if (menuItemId == R.id.nav_assistant) { + } else if (menuItemId == R.id.nav_assistant && !(this instanceof ComposeActivity)) { startComposeActivity(ComposeDestination.AssistantScreen, R.string.assistant_screen_top_bar_title); } else if (menuItemId == R.id.nav_gallery) { startPhotoSearch(menuItem.getItemId()); @@ -949,7 +950,7 @@ public abstract class DrawerActivity extends ToolbarActivity if (bottomNavigationView != null) { MenuItem menuItem = bottomNavigationView.getMenu().findItem(menuItemId); - // Don't highlight assistant bottom navigation item because Assistant screen doesn't have bottom navigation bar + // Don't highlight assistant bottom navigation item because Assistant screen doesn't have same bottom navigation bar if (menuItem != null && !menuItem.isChecked() && menuItem.getItemId() != R.id.nav_assistant) { menuItem.setChecked(true); } diff --git a/app/src/main/res/layout/activity_compose.xml b/app/src/main/res/layout/activity_compose.xml index 2e49ac23e7..26b892a852 100644 --- a/app/src/main/res/layout/activity_compose.xml +++ b/app/src/main/res/layout/activity_compose.xml @@ -6,13 +6,13 @@ ~ SPDX-FileCopyrightText: 2024 Nextcloud GmbH ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only --> - + android:focusable="true" + xmlns:app="http://schemas.android.com/apk/res-auto"> + android:layout_height="0dp" + android:layout_weight="1"/> + +