Skip to content

Commit 53b926b

Browse files
committed
Fix thread for remove chat header
MOB-3387
1 parent a9baf3c commit 53b926b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

widgetssdk/src/main/java/com/glia/widgets/view/head/ActivityWatcherForChatHead.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ internal class ActivityWatcherForChatHead(
121121
override fun removeChatHeadLayoutIfPresent() {
122122
Logger.d(TAG, "Bubble: remove application-only bubble")
123123
saveBubblePosition()
124-
(fetchGliaOrRootView() as? ViewGroup)?.removeView(chatHeadLayout)
124+
(fetchGliaOrRootView() as? ViewGroup)?.let { gliaOrRootView ->
125+
gliaOrRootView.post {
126+
gliaOrRootView.removeView(chatHeadLayout)
127+
}
128+
}
125129
chatHeadLayout = null
126130
}
127131

0 commit comments

Comments
 (0)