Skip to content

Question about the flatMapMerge() operator#9

Description

@aliumujib

Hello Garima,

Your repo is a great example of using Kotlin Flows with the MVI architecture, so thanks for it 馃槂. I have a quick question though. In processActions () method of your CharactersViewModel . You demonstrated two approaches of mapping from actions to results. When using the streaming approach in actionToResultTransformer(), I noticed that my actionsFlow suddenly returns emits more than one action which in turn executes more than one network call. So flowOf("A") emits "A", "A" or sometimes "A","A","A" when I pass it into actionToResultTransformer() but behaves normally when I use the non streaming approach. Is there a reason for this behaviour and how can it be fixed?

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