From 1d4591ce68624f0a28055e1ffa40b7226ad44f2d Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 14 Dec 2016 15:01:50 +0000 Subject: [PATCH] Add UI in UserSettings for bulk rejecting invites --- src/components/structures/UserSettings.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 49674957bc..a33095b8e8 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -280,6 +280,10 @@ module.exports = React.createClass({ Modal.createDialog(DeactivateAccountDialog, {}); }, + _onRejectAllInvitesClicked: function() { + console.log("yup"); + }, + _renderUserInterfaceSettings: function() { var client = MatrixClientPeg.get(); @@ -418,6 +422,24 @@ module.exports = React.createClass({ ; }, + _renderBulkOptions: function() { + let invitedRooms = MatrixClientPeg.get().getRooms().filter((r) => { + return r.hasMembershipState(this._me, "invite"); + }); + if (invitedRooms.length === 0) { + return null; + } + return
+

Bulk Options

+
+ +
+
; + }, + render: function() { var self = this; var Loader = sdk.getComponent("elements.Spinner"); @@ -580,6 +602,7 @@ module.exports = React.createClass({ {this._renderLabs()} {this._renderDevicesPanel()} {this._renderCryptoInfo()} + {this._renderBulkOptions()}

Advanced