You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-19 05:22:13 +03:00
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.
This commit is contained in:
@@ -68,7 +68,7 @@ const TagPanel = React.createClass({
|
||||
});
|
||||
});
|
||||
// This could be done by anything with a matrix client
|
||||
GroupActions.fetchJoinedGroups(this.context.matrixClient);
|
||||
dis.dispatch(GroupActions.fetchJoinedGroups(this.context.matrixClient));
|
||||
},
|
||||
|
||||
componentWillUnmount() {
|
||||
@@ -81,7 +81,7 @@ const TagPanel = React.createClass({
|
||||
|
||||
_onGroupMyMembership() {
|
||||
if (this.unmounted) return;
|
||||
GroupActions.fetchJoinedGroups(this.context.matrixClient);
|
||||
dis.dispatch(GroupActions.fetchJoinedGroups.bind(this.context.matrixClient));
|
||||
},
|
||||
|
||||
onClick() {
|
||||
@@ -94,7 +94,7 @@ const TagPanel = React.createClass({
|
||||
},
|
||||
|
||||
onTagTileEndDrag() {
|
||||
TagOrderActions.commitTagOrdering(this.context.matrixClient);
|
||||
dis.dispatch(TagOrderActions.commitTagOrdering(this.context.matrixClient));
|
||||
},
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user