mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 22:14:58 +08:00
Add comment to explain sync_state dispatch
This commit is contained in:
parent
fffe425730
commit
8fc44a9b66
@ -895,6 +895,11 @@ module.exports = React.createClass({
|
||||
});
|
||||
|
||||
cli.on('sync', function(state, prevState) {
|
||||
// LifecycleStore and others cannot directly subscribe to matrix client for
|
||||
// events because flux only allows store state changes during flux dispatches.
|
||||
// So dispatch directly from here. Ideally we'd use a SyncStateStore that
|
||||
// would do this dispatch and expose the sync state itself (by listening to
|
||||
// its own dispatch).
|
||||
dis.dispatch({action: 'sync_state', prevState, state});
|
||||
self.updateStatusIndicator(state, prevState);
|
||||
if (state === "SYNCING" && prevState === "SYNCING") {
|
||||
|
Loading…
Reference in New Issue
Block a user