Call onCreate faster
This commit is contained in:
@@ -33,11 +33,10 @@ class MainActivity : AppCompatActivity() {
|
|||||||
lateinit var logger: Logger
|
lateinit var logger: Logger
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
installSplashScreen().setKeepOnScreenCondition {
|
val splashScreen = installSplashScreen()
|
||||||
viewModel.startDestination.value == null
|
|
||||||
}
|
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
logger.v { "onCreate() called with: savedInstanceState = $savedInstanceState" }
|
logger.v { "onCreate() called with: savedInstanceState = $savedInstanceState" }
|
||||||
|
splashScreen.setKeepOnScreenCondition { viewModel.startDestination.value == null }
|
||||||
binding = MainActivityBinding.inflate(layoutInflater)
|
binding = MainActivityBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
configureToolbar()
|
configureToolbar()
|
||||||
|
|||||||
Reference in New Issue
Block a user