From c35c9f7c3afe606b18a6082e84db314bbbddbcaa Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 22 Jun 2016 16:20:06 +0100 Subject: [PATCH] PR feedback --- src/components/structures/RoomDirectory.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 2b96caec..7bcc5397 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -98,11 +98,9 @@ module.exports = React.createClass({ var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - var room_alias = get_display_alias_for_room(room); - Modal.createDialog(QuestionDialog, { title: "Remove from Directory", - description: `Delete the room alias '${room_alias}' and remove '${name}' from the directory?`, + description: `Delete the room alias '${alias}' and remove '${name}' from the directory?`, onFinished: (should_delete) => { if (!should_delete) return; @@ -112,12 +110,13 @@ module.exports = React.createClass({ MatrixClientPeg.get().setRoomDirectoryVisibility(room.room_id, 'private').then(() => { step = 'delete the alias.'; - MatrixClientPeg.get().deleteAlias(room_alias); + return MatrixClientPeg.get().deleteAlias(alias); }).done(() => { modal.close(); this.getPublicRooms(); }, function(err) { modal.close(); + this.getPublicRooms(); Modal.createDialog(ErrorDialog, { title: "Failed to "+step, description: err.toString()