mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-22 00:11:03 +02:00
Recreates the viewModel when the Account object changes.
This commit is contained in:
parent
d3d2845f10
commit
f072b98fd7
@ -41,7 +41,7 @@ fun AccountScreen(
|
||||
}
|
||||
is AccountState.LoggedIn -> {
|
||||
val accountViewModel: AccountViewModel = viewModel(
|
||||
key = state.account.userProfile().pubkeyHex,
|
||||
key = state.account.hashCode().toString(),
|
||||
factory = AccountViewModel.Factory(state.account, sharedPreferencesViewModel.sharedPrefs)
|
||||
)
|
||||
|
||||
@ -49,7 +49,7 @@ fun AccountScreen(
|
||||
}
|
||||
is AccountState.LoggedInViewOnly -> {
|
||||
val accountViewModel: AccountViewModel = viewModel(
|
||||
key = state.account.userProfile().pubkeyHex,
|
||||
key = state.account.hashCode().toString(),
|
||||
factory = AccountViewModel.Factory(state.account, sharedPreferencesViewModel.sharedPrefs)
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user