Updated on 2026-08-14
This commit is contained in:
parent
2a61e32f0c
commit
31bfe75e14
1 changed files with 3 additions and 4 deletions
|
|
@ -31,14 +31,12 @@ internal class WelcomeViewModel @Inject constructor(
|
|||
private val stateInternal = MutableStateFlow(WelcomeScreenState())
|
||||
val state: StateFlow<WelcomeScreenState> = stateInternal
|
||||
|
||||
init {
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
store.dispatch(WelcomeAction.SetCoroutineScope(viewModelScope))
|
||||
|
||||
subscribeToStoreChanges()
|
||||
initGlobalState()
|
||||
}
|
||||
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
val welcomeAction = if (initialIntent != null) {
|
||||
WelcomeAction.ProceedWithIntent(initialIntent)
|
||||
} else {
|
||||
|
|
@ -81,9 +79,10 @@ internal class WelcomeViewModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
store.dispatch(WelcomeAction.ClearCoroutineScope)
|
||||
store.unsubscribe(this)
|
||||
super.onDestroy(owner)
|
||||
}
|
||||
|
||||
private fun createWarningIfNeeded(error: TangemError?): WarningModel? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue