mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-18 07:11:58 +03:00
Fix IllegalArgumentException reported from store on HomeActivity aunch
This commit is contained in:
parent
b732ea6c69
commit
c90f5ed370
3 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ Improvements 🙌:
|
||||||
-
|
-
|
||||||
|
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
-
|
- Crash reported on playstore for HomeActivity launch (151 reports)
|
||||||
|
|
||||||
SDK API changes ⚠️:
|
SDK API changes ⚠️:
|
||||||
-
|
-
|
||||||
|
|
|
@ -282,8 +282,8 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
override fun create(viewModelContext: ViewModelContext, state: SharedSecureStorageViewState): SharedSecureStorageViewModel? {
|
override fun create(viewModelContext: ViewModelContext, state: SharedSecureStorageViewState): SharedSecureStorageViewModel? {
|
||||||
val activity: SharedSecureStorageActivity = viewModelContext.activity()
|
val activity: SharedSecureStorageActivity = viewModelContext.activity()
|
||||||
val args: SharedSecureStorageActivity.Args? = activity.intent.getParcelableExtra(MvRx.KEY_ARG)
|
val args: SharedSecureStorageActivity.Args = activity.intent.getParcelableExtra(MvRx.KEY_ARG) ?: error("Missing args")
|
||||||
return args?.let { activity.viewModelFactory.create(state, it) }
|
return activity.viewModelFactory.create(state, args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ class HomeActivityViewModel @AssistedInject constructor(
|
||||||
override fun create(viewModelContext: ViewModelContext, state: HomeActivityViewState): HomeActivityViewModel? {
|
override fun create(viewModelContext: ViewModelContext, state: HomeActivityViewState): HomeActivityViewModel? {
|
||||||
val activity: HomeActivity = viewModelContext.activity()
|
val activity: HomeActivity = viewModelContext.activity()
|
||||||
val args: HomeActivityArgs? = activity.intent.getParcelableExtra(MvRx.KEY_ARG)
|
val args: HomeActivityArgs? = activity.intent.getParcelableExtra(MvRx.KEY_ARG)
|
||||||
return args?.let { activity.viewModelFactory.create(state, it) }
|
return activity.viewModelFactory.create(state, args ?: HomeActivityArgs(clearNotification = false, accountCreation = false))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue