Browse Source

Drawer icon order fix

pull/61/merge
Ezerous 6 years ago
parent
commit
de3c564325
No known key found for this signature in database GPG Key ID: 262B2954BBA319E3
  1. 8
      app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

8
app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

@ -408,9 +408,9 @@ public abstract class BaseActivity extends AppCompatActivity {
}); });
if (sessionManager.isLoggedIn()) if (sessionManager.isLoggedIn())
drawerBuilder.addDrawerItems(homeItem, shoutboxItem, bookmarksItem, downloadsItem, settingsItem, loginLogoutItem, aboutItem); drawerBuilder.addDrawerItems(homeItem, bookmarksItem, shoutboxItem, downloadsItem, settingsItem, loginLogoutItem, aboutItem);
else else
drawerBuilder.addDrawerItems(homeItem, shoutboxItem, bookmarksItem, settingsItem, loginLogoutItem, aboutItem); drawerBuilder.addDrawerItems(homeItem, bookmarksItem, shoutboxItem, settingsItem, loginLogoutItem, aboutItem);
drawer = drawerBuilder.build(); drawer = drawerBuilder.build();
@ -434,10 +434,10 @@ public abstract class BaseActivity extends AppCompatActivity {
setDefaultAvatar(); setDefaultAvatar();
} else { } else {
if (!drawer.getDrawerItems().contains(downloadsItem)) { if (!drawer.getDrawerItems().contains(downloadsItem)) {
drawer.addItemAtPosition(downloadsItem, 3); drawer.addItemAtPosition(downloadsItem, 4);
} }
// if (!drawer.getDrawerItems().contains(uploadItem)) { // if (!drawer.getDrawerItems().contains(uploadItem)) {
// drawer.addItemAtPosition(uploadItem, 4); // drawer.addItemAtPosition(uploadItem, 5);
// } // }
loginLogoutItem.withName(R.string.logout).withIcon(logoutIcon); //Swap login with logout loginLogoutItem.withName(R.string.logout).withIcon(logoutIcon); //Swap login with logout
profileDrawerItem.withName(sessionManager.getUsername()); profileDrawerItem.withName(sessionManager.getUsername());

Loading…
Cancel
Save