From 6a0f70c491ec770e2642eb6e4b5e77f9d7712fd9 Mon Sep 17 00:00:00 2001 From: Ezerous Date: Sun, 4 Dec 2016 22:45:45 +0200 Subject: [PATCH] Minor drawer fix --- .../main/java/gr/thmmy/mthmmy/activities/BaseActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/BaseActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/BaseActivity.java index 28d04c89..2cd663a6 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/BaseActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/BaseActivity.java @@ -117,7 +117,10 @@ public class BaseActivity extends AppCompatActivity //Drawer Items homeItem = new PrimaryDrawerItem().withIdentifier(HOME_ID).withName(R.string.home).withIcon(homeIcon); - loginLogoutItem = new PrimaryDrawerItem().withIdentifier(LOG_ID).withName(R.string.logout).withIcon(logoutIcon); + if (sessionManager.getLogStatus()!= LOGGED_IN) //When logged out or if user is guest + loginLogoutItem = new PrimaryDrawerItem().withIdentifier(LOG_ID).withName(R.string.login).withIcon(loginIcon).withSelectable(false); + else + loginLogoutItem = new PrimaryDrawerItem().withIdentifier(LOG_ID).withName(R.string.logout).withIcon(logoutIcon).withSelectable(false); aboutItem = new PrimaryDrawerItem().withIdentifier(ABOUT_ID).withName(R.string.about).withIcon(aboutIcon); //Profile