Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
[bug] UninitializedPropertyAccessException crash when browsing device…
Browse files Browse the repository at this point in the history
… folders: #26
  • Loading branch information
tuancoltech committed Oct 14, 2023
1 parent d55eae1 commit 1720939
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal class DeviceFolderItem(
set(value) {}

private var isExpanded = node.isExpanded
private lateinit var animator: ValueAnimator
private var animator: ValueAnimator? = null

override fun createBinding(
inflater: LayoutInflater,
Expand Down Expand Up @@ -60,11 +60,11 @@ internal class DeviceFolderItem(

private fun animateExpanded(expanded: Boolean) {
if (expanded) {
animator.setFloatValues(0F, 90F)
animator.start()
animator?.setFloatValues(0F, 90F)
animator?.start()
} else {
animator.setFloatValues(90F, 00F)
animator.start()
animator?.setFloatValues(90F, 00F)
animator?.start()
}

isExpanded = expanded
Expand Down

0 comments on commit 1720939

Please sign in to comment.