Updated on 2026-08-14
This commit is contained in:
parent
d3d91e3394
commit
638cbc9d23
8 changed files with 6 additions and 8 deletions
|
|
@ -356,7 +356,7 @@ open class TangemApplication : Application(), ImageLoaderFactory, Configuration.
|
|||
|
||||
private fun createReduxStore(): Store<AppState> {
|
||||
return Store(
|
||||
reducer = { action, state -> appReducer(action, state) },
|
||||
reducer = { action, state -> appReducer(action, requireNotNull(state)) },
|
||||
middleware = AppState.getMiddleware(),
|
||||
state = AppState(
|
||||
daggerGraphState = DaggerGraphState(
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@ import com.tangem.tap.features.welcome.redux.WelcomeReducer
|
|||
import com.tangem.tap.proxy.redux.DaggerGraphReducer
|
||||
import org.rekotlin.Action
|
||||
|
||||
@Suppress("CanBeNonNullable")
|
||||
fun appReducer(action: Action, state: AppState?): AppState {
|
||||
requireNotNull(state)
|
||||
fun appReducer(action: Action, state: AppState): AppState {
|
||||
if (action is AppAction.RestoreState) return action.state
|
||||
|
||||
return AppState(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue