From 80d4873542933b09ab0672aaeac6698fa6e3aaf8 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 7 Nov 2017 16:54:28 +0000 Subject: [PATCH] Disable RoomDetailList in GroupView when editing Otherwise the rooms can be clicked on. --- src/components/structures/GroupView.js | 8 +++++++- src/components/views/rooms/RoomDetailList.js | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 24aa552890..795efaec1e 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -673,6 +673,10 @@ export default React.createClass({ { _t('Add rooms to this community') } ) :
; + const roomDetailListClassName = classnames({ + "mx_fadable": true, + "mx_fadable_faded": this.state.editing, + }); return

{ _t('Rooms') }

@@ -680,7 +684,9 @@ export default React.createClass({
{ this.state.groupRoomsLoading ? : - + }
; }, diff --git a/src/components/views/rooms/RoomDetailList.js b/src/components/views/rooms/RoomDetailList.js index c44b662fa7..27972af484 100644 --- a/src/components/views/rooms/RoomDetailList.js +++ b/src/components/views/rooms/RoomDetailList.js @@ -23,6 +23,7 @@ import sanitizeHtml from 'sanitize-html'; import { ContentRepo } from 'matrix-js-sdk'; import MatrixClientPeg from '../../../MatrixClientPeg'; import PropTypes from 'prop-types'; +import classNames from 'classnames'; function getDisplayAliasForRoom(room) { return room.canonicalAlias || (room.aliases ? room.aliases[0] : ""); @@ -117,6 +118,8 @@ export default React.createClass({ worldReadable: PropTypes.bool, guestCanJoin: PropTypes.bool, })), + + className: PropTypes.string, }, getRows: function() { @@ -138,7 +141,7 @@ export default React.createClass({ ; } - return
+ return
{ rooms }
; },