From 1c207f3b5545d3e97a7e7e5f105461ca8821d25b Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 9 Oct 2019 11:28:16 +0100 Subject: [PATCH] Revert 2040587826ff56372cd783d72ed9c8bab53f53fc --- src/AddThreepid.js | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/src/AddThreepid.js b/src/AddThreepid.js index 0f09264295..f4a2a88b36 100644 --- a/src/AddThreepid.js +++ b/src/AddThreepid.js @@ -188,20 +188,11 @@ export default class AddThreepid { // pop up an interactive auth dialog const InteractiveAuthDialog = sdk.getComponent("dialogs.InteractiveAuthDialog"); - return new Promise((resolve, reject) => { - Modal.createTrackedDialog('Add Email', '', InteractiveAuthDialog, { - title: _t("Add Email Address"), - matrixClient: MatrixClientPeg.get(), - authData: e.data, - makeRequest: this._makeAddThreepidOnlyRequest, - onFinished: (success) => { - if (success) { - resolve(); - } else { - reject(); - } - }, - }); + Modal.createTrackedDialog('Add Email', '', InteractiveAuthDialog, { + title: _t("Add Email Address"), + matrixClient: MatrixClientPeg.get(), + authData: e.data, + makeRequest: this._makeAddThreepidOnlyRequest, }); } } @@ -289,20 +280,11 @@ export default class AddThreepid { // pop up an interactive auth dialog const InteractiveAuthDialog = sdk.getComponent("dialogs.InteractiveAuthDialog"); - return new Promise((resolve, reject) => { - Modal.createTrackedDialog('Add MSISDN', '', InteractiveAuthDialog, { - title: _t("Add Phone Number"), - matrixClient: MatrixClientPeg.get(), - authData: e.data, - makeRequest: this._makeAddThreepidOnlyRequest, - onFinished: (success) => { - if (success) { - resolve(); - } else { - reject(); - } - }, - }); + Modal.createTrackedDialog('Add MSISDN', '', InteractiveAuthDialog, { + title: _t("Add Phone Number"), + matrixClient: MatrixClientPeg.get(), + authData: e.data, + makeRequest: this._makeAddThreepidOnlyRequest, }); } }