Merge pull request #5013 from ByteHamster/sidebar-hide-animation-fix
Fixed animation when hiding drawer items
This commit is contained in:
commit
57e5784e6f
|
@ -159,8 +159,10 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder>
|
|||
int viewType = getItemViewType(position);
|
||||
if (viewType == VIEW_TYPE_SUBSCRIPTION) {
|
||||
return itemAccess.getItem(position - getSubscriptionOffset()).id;
|
||||
} else if (viewType == VIEW_TYPE_NAV) {
|
||||
return -Math.abs(fragmentTags.get(position).hashCode()) - 1; // Folder IDs are >0
|
||||
} else {
|
||||
return -position - 1; // IDs are >0
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,8 @@ public class NavDrawerData {
|
|||
public boolean isOpen;
|
||||
|
||||
public FolderDrawerItem(String name) {
|
||||
super(DrawerItem.Type.FOLDER, (long) name.hashCode() << 20); // Keep IDs >0 but make room for many feeds
|
||||
// Keep IDs >0 but make room for many feeds
|
||||
super(DrawerItem.Type.FOLDER, (long) Math.abs(name.hashCode()) << 20);
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue