Skip to content

Commit

Permalink
Merge pull request #63 from Carmen-Git-It/recent-bathrooms-tab
Browse files Browse the repository at this point in the history
Fixed issue with recent bathrooms navigation item.
  • Loading branch information
hissingpanda authored Nov 26, 2018
2 parents 3cef874 + 2a37b00 commit bf4c958
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/src/main/java/org/refugerestrooms/views/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,7 @@ public boolean onNavigationItemSelected(MenuItem item) {
mFab.show();
bottomSheet.setVisibility(View.VISIBLE);
} else if (id == R.id.nav_bathrooms) {
Log.d("RefugeRestrooms", "Nav bathrooms");
title = getString(R.string.saved_bathrooms);
List<BathroomEntity> bathroomsList = loadSavedBathrooms();
DatabaseEntityConverter dataEntityConv = new DatabaseEntityConverter();
Expand All @@ -1454,6 +1455,7 @@ public boolean onNavigationItemSelected(MenuItem item) {
bottomSheet.setVisibility(View.VISIBLE);
} else if (id == R.id.nav_add) {
title = getString(R.string.add_title_section);
fragment = addBathroomFragment;
fragmentTitle = "addBathroom";
mFab.show();
bottomSheet.setVisibility(View.INVISIBLE);
Expand All @@ -1471,12 +1473,6 @@ public boolean onNavigationItemSelected(MenuItem item) {
.addToBackStack(fragmentTitle)
.commit();
setToolbarTitle(title);
} else {
fragmentManager.beginTransaction()
.replace(R.id.container, addBathroomFragment)
.addToBackStack(fragmentTitle)
.commit();
setToolbarTitle(title);
}

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
Expand Down

0 comments on commit bf4c958

Please sign in to comment.