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
WIP reworking of skinning and app integration process
This commit is contained in:
@@ -17,21 +17,17 @@ limitations under the License.
|
||||
'use strict';
|
||||
|
||||
var flux = require("flux");
|
||||
var extend = require("./extend");
|
||||
|
||||
var MatrixDispatcher = function() {
|
||||
flux.Dispatcher.call(this);
|
||||
class MatrixDispatcher extends flux.Dispatcher {
|
||||
dispatch(payload) {
|
||||
if (this.dispatching) {
|
||||
setTimeout(super.dispatch.bind(this, payload), 0);
|
||||
} else {
|
||||
this.dispatching = true;
|
||||
super.dispatch.call(this, payload);
|
||||
this.dispatching = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
extend(MatrixDispatcher.prototype, flux.Dispatcher.prototype);
|
||||
MatrixDispatcher.prototype.dispatch = function(payload) {
|
||||
if (this.dispatching) {
|
||||
setTimeout(flux.Dispatcher.prototype.dispatch.bind(this, payload), 0);
|
||||
} else {
|
||||
this.dispatching = true;
|
||||
flux.Dispatcher.prototype.dispatch.call(this, payload);
|
||||
this.dispatching = false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new MatrixDispatcher();
|
||||
|
||||
Reference in New Issue
Block a user