minor style tweak

This commit is contained in:
Tibor Kaputa 2023-07-24 21:14:59 +02:00 committed by GitHub
parent 2e08a0889c
commit a7f0236686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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