Fix some lifecycle-related crashes.

This commit is contained in:
Greyson Parrelli
2022-06-16 11:41:56 -04:00
parent 69e2a138d9
commit 673a8f540b
3 changed files with 24 additions and 5 deletions

View File

@@ -82,6 +82,10 @@ class CircularProgressMaterialButton @JvmOverloads constructor(
}
private fun transformTo(state: State, animate: Boolean) {
if (!isAttachedToWindow) {
return
}
if (state == currentState && state == requestedState) {
return
}