Skip to content

Commit

Permalink
Share: document the future state machine
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMure committed Jul 19, 2017
1 parent 2aa11fd commit 9e41ca4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions app/models/Share.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ export const ShareState = {
}
export type ShareStateType = $Keys<typeof ShareState>

/**
* PlantUML diagram (http://plantuml.com/state-diagram)
*
* @startuml
*
* [*] --> Available : got a notification
*
* Available --> Downloading : start()
* Downloading --> Available : abort()
*
* Downloading --> Paused : pause()
* Paused --> Downloading : start()
*
* Paused --> Available : abort()
*
* [*] --> Sharing : created a Share locally
*
* Downloading --> Sharing : download done
*
* @enduml
*/

export const writable = {
dataVersion: 'dataVersion',
id: 'id',
Expand Down

0 comments on commit 9e41ca4

Please sign in to comment.