You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Make GroupStore use MatrixClientPeg
To avoid weirdness with using a cached matrix client
This commit is contained in:
@@ -20,17 +20,12 @@ import sdk from '../../../index';
|
||||
import GroupStoreCache from '../../../stores/GroupStoreCache';
|
||||
import GeminiScrollbar from 'react-gemini-scrollbar';
|
||||
import PropTypes from 'prop-types';
|
||||
import withMatrixClient from '../../../wrappers/withMatrixClient';
|
||||
|
||||
const INITIAL_LOAD_NUM_MEMBERS = 30;
|
||||
|
||||
export default withMatrixClient(React.createClass({
|
||||
export default React.createClass({
|
||||
displayName: 'GroupMemberList',
|
||||
|
||||
contextTypes: {
|
||||
matrixClient: PropTypes.object.isRequired,
|
||||
},
|
||||
|
||||
propTypes: {
|
||||
groupId: PropTypes.string.isRequired,
|
||||
},
|
||||
@@ -49,7 +44,7 @@ export default withMatrixClient(React.createClass({
|
||||
},
|
||||
|
||||
_initGroupStore: function(groupId) {
|
||||
this._groupStore = GroupStoreCache.getGroupStore(this.context.matrixClient, groupId);
|
||||
this._groupStore = GroupStoreCache.getGroupStore(groupId);
|
||||
this._groupStore.registerListener(() => {
|
||||
this._fetchMembers();
|
||||
});
|
||||
@@ -174,4 +169,4 @@ export default withMatrixClient(React.createClass({
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user