You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Replace rest of defer usages using small shim. Add homebrew promise utils
(cherry picked from commit 6850c14739)
This commit is contained in:
@@ -24,6 +24,7 @@ import sdk from './index';
|
||||
import dis from './dispatcher';
|
||||
import { _t } from './languageHandler';
|
||||
import Promise from "bluebird";
|
||||
import {defer} from "./utils/promise";
|
||||
|
||||
const DIALOG_CONTAINER_ID = "mx_Dialog_Container";
|
||||
const STATIC_DIALOG_CONTAINER_ID = "mx_Dialog_StaticContainer";
|
||||
@@ -202,7 +203,7 @@ class ModalManager {
|
||||
}
|
||||
|
||||
_getCloseFn(modal, props) {
|
||||
const deferred = Promise.defer();
|
||||
const deferred = defer();
|
||||
return [(...args) => {
|
||||
deferred.resolve(args);
|
||||
if (props && props.onFinished) props.onFinished.apply(null, args);
|
||||
|
||||
Reference in New Issue
Block a user