Dispatch MatrixActions synchronously
Otherwise we risk blocking the dispatches on other work, and they do not need to be done asynchronously. This emerged as a bug where the room list appeared empty until MatrixActions.sync dispatches all occured in one big lump, well after the sync events being emitted by the js-sdk.
This commit is contained in:
parent
1ea6301eca
commit
21d70125e4
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ export default {
|
||||||
*/
|
*/
|
||||||
_addMatrixClientListener(matrixClient, eventName, actionCreator) {
|
_addMatrixClientListener(matrixClient, eventName, actionCreator) {
|
||||||
const listener = (...args) => {
|
const listener = (...args) => {
|
||||||
dis.dispatch(actionCreator(matrixClient, ...args));
|
dis.dispatch(actionCreator(matrixClient, ...args), true);
|
||||||
};
|
};
|
||||||
matrixClient.on(eventName, listener);
|
matrixClient.on(eventName, listener);
|
||||||
this._matrixClientListenersStop.push(() => {
|
this._matrixClientListenersStop.push(() => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue