mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Merge pull request #6176 from vector-im/luke/fix-invites-not-appearing
Only use DNDRoomTile for editable sub lists
This commit is contained in:
commit
fc4da3e3bf
@ -194,26 +194,27 @@ var RoomSubList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
makeRoomTiles: function() {
|
makeRoomTiles: function() {
|
||||||
var self = this;
|
const DNDRoomTile = sdk.getComponent("rooms.DNDRoomTile");
|
||||||
var DNDRoomTile = sdk.getComponent("rooms.DNDRoomTile");
|
const RoomTile = sdk.getComponent("rooms.RoomTile");
|
||||||
return this.state.sortedList.map(function(room, index) {
|
return this.state.sortedList.map((room, index) => {
|
||||||
// XXX: is it evil to pass in self as a prop to RoomTile?
|
// XXX: is it evil to pass in this as a prop to RoomTile? Yes.
|
||||||
return (
|
|
||||||
<DNDRoomTile
|
// We should only use <DNDRoomTile /> when editable
|
||||||
index={index} // For DND
|
const RoomTileComponent = this.props.editable ? DNDRoomTile : RoomTile;
|
||||||
room={ room }
|
return <RoomTileComponent
|
||||||
roomSubList={ self }
|
index={index} // For DND
|
||||||
tagName={self.props.tagName}
|
room={room}
|
||||||
key={ room.roomId }
|
roomSubList={this}
|
||||||
collapsed={ self.props.collapsed || false}
|
tagName={this.props.tagName}
|
||||||
unread={ Unread.doesRoomHaveUnreadMessages(room) }
|
key={room.roomId}
|
||||||
highlight={ room.getUnreadNotificationCount('highlight') > 0 || self.props.isInvite }
|
collapsed={this.props.collapsed || false}
|
||||||
isInvite={ self.props.isInvite }
|
unread={Unread.doesRoomHaveUnreadMessages(room)}
|
||||||
refreshSubList={ self._updateSubListCount }
|
highlight={room.getUnreadNotificationCount('highlight') > 0 || this.props.isInvite}
|
||||||
incomingCall={ null }
|
isInvite={this.props.isInvite}
|
||||||
onClick={ self.onRoomTileClick }
|
refreshSubList={this._updateSubListCount}
|
||||||
/>
|
incomingCall={null}
|
||||||
);
|
onClick={this.onRoomTileClick}
|
||||||
|
/>;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user