Skip to content

Commit

Permalink
Invalidate THEOplayer view when adding/removing UI
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Jun 30, 2023
1 parent 3f2e550 commit 94e643a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ui/src/main/java/com/theoplayer/android/ui/UIController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,14 @@ private fun PlayerContainer(
DisposableEffect(uiContainer, composeView) {
val container = uiContainer
val view = composeView
if (view != null) {
container?.addView(view)
if (container != null && view != null) {
container.addView(view)
theoplayerView.postInvalidate()
}
onDispose {
if (view != null) {
container?.removeView(view)
if (container != null && view != null) {
container.removeView(view)
theoplayerView.postInvalidate()
}
}
}
Expand Down

0 comments on commit 94e643a

Please sign in to comment.