minor style tweak
This commit is contained in:
parent
2e08a0889c
commit
a7f0236686
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue