Skip to content

Commit

Permalink
Remove views right before adding on tools
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Nov 12, 2023
1 parent 2f974a1 commit ff51d0e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ class ToolsFragment : BoundFragment<FragmentToolsBinding>() {
}

private fun populateTools(categories: List<CategorizedTools>, grid: GridLayout) {
grid.removeAllViews()

inBackground {
val viewsToAdd = mutableListOf<View>()

Expand All @@ -191,6 +189,7 @@ class ToolsFragment : BoundFragment<FragmentToolsBinding>() {
}

onMain {
grid.removeAllViews()
viewsToAdd.forEach {
grid.addView(it)
}
Expand Down

0 comments on commit ff51d0e

Please sign in to comment.