From 20cbc016987e144ae1b46fe9468503569fde6f64 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Thu, 29 Mar 2018 18:32:49 +0100 Subject: [PATCH] Add callback handler for integration manager close. --- src/IntegrationManager.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/IntegrationManager.js b/src/IntegrationManager.js index 6d488d91df..eb45a1f425 100644 --- a/src/IntegrationManager.js +++ b/src/IntegrationManager.js @@ -47,9 +47,9 @@ export default class IntegrationManager { * Launch the integrations manager on the stickers integration page * @param {string} integName integration / widget type * @param {string} integId integration / widget ID - * @param {function} onClose Callback to invoke on integration manager close + * @param {function} onFinished Callback to invoke on integration manager close */ - static async open(integName, integId, onClose) { + static async open(integName, integId, onFinished) { await IntegrationManager._init(); const IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager"); if (global.mxIntegrationManager.error || @@ -67,10 +67,7 @@ export default class IntegrationManager { null; Modal.createTrackedDialog('Integrations Manager', '', IntegrationsManager, { src: src, + onFinished: onFinished, }, "mx_IntegrationsManager"); - - if (onClose) { - onClose(); - } } }