diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/compose/extensions/ComposeExtensions.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/compose/extensions/ComposeExtensions.kt index b4ddd5c..ed088c3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/compose/extensions/ComposeExtensions.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/compose/extensions/ComposeExtensions.kt @@ -10,8 +10,11 @@ import androidx.lifecycle.Lifecycle import com.google.accompanist.systemuicontroller.rememberSystemUiController fun Context.getActivity(): Activity { - if (this is Activity) return this - return if (this is ContextWrapper) baseContext.getActivity() else getActivity() + return when (this) { + is Activity -> this + is ContextWrapper -> baseContext.getActivity() + else -> getActivity() + } } @Composable