Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This one works
- viewModel {
- fun getProfileFlow(): GetProfileFlow? {
- val accountId = getOrNull<Id>()
- return accountId?.let { id ->
- get(parameters = { parametersOf(id) })
- }
- }
- SocialViewModel(get(), getProfileFlow())
- }
- // This one doesn't
- viewModel {
- val accountId = getOrNull<Id>()
- val profileFlow = accountId?.let { id ->
- get<GetProfileFlow>(parameters = { parametersOf(id) })
- }
- SocialViewModel(get(), profileFlow)
- }
Advertisement
Add Comment
Please, Sign In to add comment