Commit Graph

65 Commits (662996ba98042fc349e213653f0112ba777b12bf)

Author SHA1 Message Date
lukebarnard ddf5dbad89 Doc fetchJoinedGroups 2017-12-13 11:05:23 +00:00
lukebarnard a653ece99e Doc commitTagOrdering 2017-12-13 11:05:06 +00:00
lukebarnard 5de0559192 Adjust actionCreators doc 2017-12-13 10:39:45 +00:00
lukebarnard cc30b8fb09 Doc MatrixActionCreators properly 2017-12-13 10:37:14 +00:00
lukebarnard d5534a9ece Copyright 2017-12-13 10:17:38 +00:00
Luke Barnard 13925db251 Refactor to allow dispatching of two kinds of Actions
They are:
 1. The existing type of Action, Objects with an `action` type.
 1. Asyncronous Actions, functions that accept a `dispatch` argument, which can be used to dispatch Actions asyncronously.
2017-12-12 17:32:43 +00:00
Luke Barnard 60d8ebb914 Refactor MatrixActions to something much easier to grok. 2017-12-12 16:05:18 +00:00
Luke Barnard 8d2d3e62cd Only commit a non-falsy tags list 2017-12-11 17:30:10 +00:00
Luke Barnard 991ea4ebe5 Fix a few bugs with TagOrderStore:
- Have TagOrderStore listen for MatrixSync actions so that it can initialise
   tag ordering state.
 - Expose an empty list until the client has done its first sync and has
   fetched list of joined groups
2017-12-11 17:17:05 +00:00
Luke Barnard df88b71dbb Comment typo 2017-12-08 16:47:52 +00:00
Luke Barnard 53e7232a97 Linting 2017-12-08 11:08:57 +00:00
Luke Barnard 31a52c15bd Fix bug with removing matrix listeners 2017-12-08 10:55:29 +00:00
Luke Barnard 72550961e5 Move 'commit_tags' to action creator 2017-12-08 10:52:20 +00:00
Luke Barnard 12515441cd Handle accountData events from TagOrderStore
This introduces a generic way to register certain events emitted by
the js-sdk as those that should be propagated through as dispatched
actions.

This allows the store to treat the js-sdk as the "Server" in the
Flux data flow model. It also allows for stores to not be aware
specifically of the matrix client if they are only reading from it.
2017-12-08 10:05:18 +00:00
Luke Barnard ee6df105fe Introduce action creators
These can be used to dispatch actions immediately, or after some asynchronous
work has been done. Also, create GroupActions.fetchJoinedGroups as an example.

The concept of async action creators can be used in the following cases:
 - stores or views that do async work, dispatching based on the results
 - actions that have complicated payloads, would make more sense as functions
   with documentation that dispatch created actions.
2017-12-07 14:17:32 +00:00