Skip to content

Commit

Permalink
Merge branch 'master' into save-state-on-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kizitonwose committed Aug 10, 2019
2 parents f891910 + 8f8c3b4 commit f7fb445
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 f7fb445

Please sign in to comment.