maybe this would work ``` val bubblesIterator = (0...
# android
m
maybe this would work
Copy code
val bubblesIterator = (0 until view.childCount).mapNotNull { view.getChildAt(it).takeIf { it is BubbleView } }.iterator()
val titles = appliances?.map { it.appliance_type.toString() }

while (bubblesIterator.hasNext()) {
    val bubble = bubble.next()
    if (bubble.title !in titles) {
        view.removeViews(bubble)
    } 
}