mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
minor style tweak
This commit is contained in:
@ -10,8 +10,11 @@ import androidx.lifecycle.Lifecycle
|
|||||||
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||||
|
|
||||||
fun Context.getActivity(): Activity {
|
fun Context.getActivity(): Activity {
|
||||||
if (this is Activity) return this
|
return when (this) {
|
||||||
return if (this is ContextWrapper) baseContext.getActivity() else getActivity()
|
is Activity -> this
|
||||||
|
is ContextWrapper -> baseContext.getActivity()
|
||||||
|
else -> getActivity()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
Reference in New Issue
Block a user