mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 21:29:54 +01:00
Fix Contacts Item always beeing selected if Back is pressed in the NavMenu
Signed-off-by: goapunk <noobie@goapunks.net>
This commit is contained in:
@@ -193,14 +193,14 @@ public class NavDrawerActivity extends BriarFragmentActivity implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
// Check the Contacts item because we always return to Contacts here
|
|
||||||
NavigationView navigation = (NavigationView) findViewById(R.id.navigation);
|
|
||||||
navigation.getMenu().findItem(R.id.nav_btn_contacts).setChecked(true);
|
|
||||||
if (getSupportFragmentManager().getBackStackEntryCount() == 0
|
if (getSupportFragmentManager().getBackStackEntryCount() == 0
|
||||||
&& drawerLayout.isDrawerOpen(START)) {
|
&& drawerLayout.isDrawerOpen(START)) {
|
||||||
drawerLayout.closeDrawer(START);
|
drawerLayout.closeDrawer(START);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Check the Contacts item because we always return to Contacts here
|
||||||
|
NavigationView navigation = (NavigationView) findViewById(R.id.navigation);
|
||||||
|
navigation.getMenu().findItem(R.id.nav_btn_contacts).setChecked(true);
|
||||||
super.onBackPressed();
|
super.onBackPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user