Skip to content

Commit

Permalink
Merge pull request mikepenz#1220 from yunarta/develop
Browse files Browse the repository at this point in the history
Small fix so mIncludeSecondaryDrawerItems works in MiniDrawer
  • Loading branch information
mikepenz committed Apr 25, 2016
2 parents 64876f5 + 2572568 commit a9203ed
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ public FastAdapter.OnLongClickListener getOnMiniDrawerItemLongClickListener() {
* @return
*/
public IDrawerItem generateMiniDrawerItem(IDrawerItem drawerItem) {
if (drawerItem instanceof PrimaryDrawerItem) {
if (drawerItem instanceof SecondaryDrawerItem) {
return mIncludeSecondaryDrawerItems ? new MiniDrawerItem((SecondaryDrawerItem) drawerItem).withEnableSelectedBackground(mEnableSelectedMiniDrawerItemBackground) : null;
} else if (drawerItem instanceof PrimaryDrawerItem) {
return new MiniDrawerItem((PrimaryDrawerItem) drawerItem).withEnableSelectedBackground(mEnableSelectedMiniDrawerItemBackground);
} else if (drawerItem instanceof SecondaryDrawerItem && mIncludeSecondaryDrawerItems) {
return new MiniDrawerItem((SecondaryDrawerItem) drawerItem).withEnableSelectedBackground(mEnableSelectedMiniDrawerItemBackground);
} else if (drawerItem instanceof ProfileDrawerItem) {
MiniProfileDrawerItem mpdi = new MiniProfileDrawerItem((ProfileDrawerItem) drawerItem);
mpdi.withEnabled(mEnableProfileClick);
Expand Down

0 comments on commit a9203ed

Please sign in to comment.