Skip to content

Commit

Permalink
Merge pull request #39 from kizitonwose/fix-crash
Browse files Browse the repository at this point in the history
Release 0.2.5
  • Loading branch information
kizitonwose authored Jul 31, 2019
2 parents a4d5b89 + 07861aa commit 8f8c3b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: android
jdk: oraclejdk8
dist: trusty
android:
components:
- tools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ internal class CalendarAdapter(
calWrapsHeight = it
}
if (calWrapsHeight.not()) return // Bug only happens when the CalenderView wraps its height.
val visibleVH = calView.findViewHolderForAdapterPosition(visibleItemPos) as MonthViewHolder
val visibleVH =
calView.findViewHolderForAdapterPosition(visibleItemPos) as? MonthViewHolder ?: return
val newHeight = visibleVH.headerView?.height.orZero() +
// For some reason `visibleVH.bodyLayout.height` does not give us the updated height.
// So we calculate it again by checking the number of visible(non-empty) rows.
Expand Down

0 comments on commit 8f8c3b4

Please sign in to comment.