BackstackAction

sealed class BackstackAction

Back stack action, the classes of this sealed class represent that actions that the back stack manager can handle and revert.

Inheritors

Types

Link copied to clipboard
data class Add(val storyStep: StoryStep, val position: Int) : BackstackAction, SingleAction

Adding a single story

Link copied to clipboard
data class BulkDelete(val deletedUnits: Map<Int, StoryStep>) : BackstackAction

Deleting many stories

Link copied to clipboard
data class Delete(val storyStep: StoryStep, val position: Int) : BackstackAction, SingleAction

Deleting a single story

Link copied to clipboard
data class Erase(val erasedStep: StoryStep, val receivingStep: StoryStep?, val erasedPosition: Int, val receivingPosition: Int?) : BackstackAction

Deleting a single story

Link copied to clipboard
data class Merge(val receiver: StoryStep, val sender: StoryStep, val positionFrom: Int, val positionTo: Int) : BackstackAction

Merging a single story

Link copied to clipboard
data class Move(val storyStep: StoryStep, val positionFrom: Int, val positionTo: Int) : BackstackAction

A move of stories

Link copied to clipboard
data class StoryStateChange(val storyStep: StoryStep, val position: Int) : BackstackAction, SingleAction

A change in the state of the story, with the exception of a text change.

Link copied to clipboard
data class StoryTextChange(val storyStep: StoryStep, val position: Int) : BackstackAction, SingleAction

A change in the text of the story. There's a separation between StoryTextChange and StoryStateChange because StoryTextChange and not saved as a unit for usability and performance reasons. A user wouldn't like to revert character by character so the BackstackManager must handle merging them.