DaggerAndroidMVVM icon indicating copy to clipboard operation
DaggerAndroidMVVM copied to clipboard

Multiple Response

Open chrizzz35 opened this issue 6 years ago • 0 comments

Hi, I want to ask, if I execute both viewModel.loadCommonGreeting(); and viewModel.loadLobbyGreeting(); in the same time and both return different object (let's say LobbyGreeting & CommonGreeting, instead of return String. And I want to show both value on the screen in different TextView.

Should I separate the state observer?

viewModel.commonState().observe(this, state -> processCommonState(state));
viewModel.lobbdyState().observe(this, state -> processLobbyState(state));

Or is there any different approach for this case?

chrizzz35 avatar May 07 '18 11:05 chrizzz35