Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:mikepenz/MaterialDrawer into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
mikepenz committed Apr 26, 2016
2 parents 0aa02d0 + 640b1cc commit 2ae1d3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
###Upgrade Notes

#### v5.2.0 -> v5.2.1
* the `SecondaryDrawerItem` is now a subclass of the `PrimaryDrawerItem` (extends `PrimaryDrawerItem`). If you have an `if` which checks for the type with `instanceOf` make sure you check for the `SecondaryDrawerItem` first. (`secondaryDrawerItem instanceOf PrimaryDrawerItem == true`)

#### v5.1.6 -> 5.1.8
* if you use the `FastAdapter` please check out the release notes of v1.4.0 (https://github.com/mikepenz/FastAdapter/releases/tag/v1.4.0)

Expand Down
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 2ae1d3c

Please sign in to comment.