Skip to content

Multiple Response #4

@chrizzz35

Description

@chrizzz35

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions