invoke

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!


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!