UndoRedo
An object that allows to undo and redo any actions happening in the pro.respawn.flowmvi.api.Store. Keep a reference to the object instance to call undo, redo, and invoke. Don't forget to install the corresponding plugin with undoRedoPlugin.
Types
Properties
Functions
Link copied to clipboard
suspend operator fun <I : MVIIntent> IntentReceiver<I>.invoke(intent: I, undo: suspend () -> Unit): Int
Add the intent to the queue with specified undo and immediately execute the intent. You cannot call UndoRedo.undo or UndoRedo.redo in intent or undo!
suspend operator fun invoke(doImmediately: Boolean = true, redo: suspend () -> Unit, undo: suspend () -> Unit): Int
Add a given undo and redo to the queue. If doImmediately is true, then redo will be executed before the queue is modified! You cannot call UndoRedo.undo or UndoRedo.redo in redo or undo!