Use `when` instead of `else if` in `Activity.kt`

This commit is contained in:
Ensar Sarajčić 2023-10-06 11:10:24 +02:00
parent f2c8b0828d
commit 9f6ba77f98
1 changed files with 3 additions and 4 deletions

View File

@ -108,10 +108,9 @@ fun CheckFeatureLocked(
}
}
LaunchedEffect(isOrWasThankYouInstalled) {
if (!skipCheck && !isOrWasThankYouInstalled) {
featureLockedAlertDialogState.show()
} else if (isOrWasThankYouInstalled) {
featureLockedAlertDialogState.hide()
when {
!skipCheck && !isOrWasThankYouInstalled -> featureLockedAlertDialogState.show()
isOrWasThankYouInstalled -> featureLockedAlertDialogState.hide()
}
}
}