Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kiryldz committed Nov 14, 2022
1 parent a09e6b0 commit b00c3eb
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ internal class ViewAnnotationManagerImpl(
private fun remove(internalId: String, annotation: ViewAnnotation) {
viewAnnotationsLayout.removeView(annotation.view)
updateVisibilityAndNotifyUpdateListeners(annotation, ViewAnnotationVisibility.INVISIBLE)
// explicit onViewDetachedFromWindow call is needed to handle use-case
// if the view has an animation attached
annotation.attachStateListener?.onViewDetachedFromWindow(annotation.view)
annotation.view.removeOnAttachStateChangeListener(annotation.attachStateListener)
annotation.attachStateListener = null
Expand Down

0 comments on commit b00c3eb

Please sign in to comment.