Skip to content

How to save command for restoring, but not execute right now #137

@spectosha

Description

@spectosha

In Activity I fill EditText and each entered character i call presenter.setName(name). In presenter I save name as class parameter. But if I'll rotate screen the name will dissapear because I don't call viewState methods when I save name in presenter. I don't need to call some method in activity to save state like this (viewState.onNameChanged()), but moxy makes me to do it. So I'd like to offer you to create feature for saving view state command without calling methods in activity if activity doesn't need to restore state.

For example when I sets name in presenter i call viewState.onRestoreName(name) and this command will reproduced in activity when activity need to restore state, but not right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions