Skip to content

BugFix - Fix Toolbar Inconsistency For Favorites Tab #15049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ private void handleBottomNavigationViewClicks() {
EventBus.getDefault().post(new ChangeMenuEvent());
} else if (menuItemId == R.id.nav_favorites) {
handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.FAVORITE_SEARCH), menuItemId);
setupToolbar();
} 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) {
Expand Down Expand Up @@ -571,8 +572,8 @@ private void onNavigationItemClicked(final MenuItem menuItem) {

closeDrawer();
} else if (itemId == R.id.nav_favorites) {
handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.FAVORITE_SEARCH),
menuItem.getItemId());
handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.FAVORITE_SEARCH), menuItem.getItemId());
setupToolbar();
} else if (itemId == R.id.nav_gallery) {
startPhotoSearch(menuItem.getItemId());
} else if (itemId == R.id.nav_on_device) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,18 @@ public void setupToolbarShowOnlyMenuButtonAndTitle(String title, View.OnClickLis
}

public void setupToolbar() {
if (mHomeSearchToolbar != null && mDefaultToolbar != null && mHomeSearchToolbar.getVisibility() == View.GONE && mDefaultToolbar.getVisibility() == View.VISIBLE) {
return;
}

setupToolbar(false, false);
}

public void setupHomeSearchToolbarWithSortAndListButtons() {
if (mHomeSearchToolbar != null && mDefaultToolbar != null && mHomeSearchToolbar.getVisibility() == View.VISIBLE && mDefaultToolbar.getVisibility() == View.GONE) {
return;
}

setupToolbar(true, true);
}

Expand Down
Loading