Find Activity.runOnUiThread { } / View.post { } calls
ProprietaryHand-rolled main-thread dispatch (runOnUiThread, view.post) was the pre-coroutine pattern for crossing thread boundaries from a background worker. In Kotlin, prefer withContext(Dispatchers.Main) { … } — it composes with structured cancellation and surfaces in the call site's coroutine context.
org. openrewrite. kotlin. android. FindRunOnUiThread$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. android. FindRunOnUiThread$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.