2015-11-30 16:55:00 +00:00
|
|
|
/*
|
2016-01-07 04:06:39 +00:00
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
var React = require("react");
|
|
|
|
var ReactDOM = require("react-dom");
|
|
|
|
var GeminiScrollbar = require('react-gemini-scrollbar');
|
|
|
|
var MatrixClientPeg = require("../../../MatrixClientPeg");
|
2015-12-17 02:49:09 +00:00
|
|
|
var CallHandler = require('../../../CallHandler');
|
2015-11-30 16:55:00 +00:00
|
|
|
var RoomListSorter = require("../../../RoomListSorter");
|
2016-01-06 18:07:24 +00:00
|
|
|
var Unread = require('../../../Unread');
|
2015-11-30 16:55:00 +00:00
|
|
|
var dis = require("../../../dispatcher");
|
|
|
|
var sdk = require('../../../index');
|
2016-02-04 18:06:24 +00:00
|
|
|
var rate_limited_func = require('../../../ratelimitedfunc');
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
var HIDE_CONFERENCE_CHANS = true;
|
|
|
|
|
|
|
|
module.exports = React.createClass({
|
|
|
|
displayName: 'RoomList',
|
|
|
|
|
|
|
|
propTypes: {
|
2015-12-01 16:29:58 +00:00
|
|
|
ConferenceHandler: React.PropTypes.any,
|
2015-11-30 16:55:00 +00:00
|
|
|
collapsed: React.PropTypes.bool,
|
|
|
|
currentRoom: React.PropTypes.string
|
|
|
|
},
|
|
|
|
|
|
|
|
getInitialState: function() {
|
|
|
|
return {
|
2015-12-18 15:13:59 +00:00
|
|
|
isLoadingLeftRooms: false,
|
2015-11-30 16:55:00 +00:00
|
|
|
lists: {},
|
2015-12-17 02:49:09 +00:00
|
|
|
incomingCall: null,
|
2015-11-30 16:55:00 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
componentWillMount: function() {
|
|
|
|
var cli = MatrixClientPeg.get();
|
|
|
|
cli.on("Room", this.onRoom);
|
2015-12-16 16:27:46 +00:00
|
|
|
cli.on("deleteRoom", this.onDeleteRoom);
|
2015-11-30 16:55:00 +00:00
|
|
|
cli.on("Room.timeline", this.onRoomTimeline);
|
|
|
|
cli.on("Room.name", this.onRoomName);
|
|
|
|
cli.on("Room.tags", this.onRoomTags);
|
2015-12-18 17:51:17 +00:00
|
|
|
cli.on("Room.receipt", this.onRoomReceipt);
|
2015-11-30 16:55:00 +00:00
|
|
|
cli.on("RoomState.events", this.onRoomStateEvents);
|
|
|
|
cli.on("RoomMember.name", this.onRoomMemberName);
|
|
|
|
|
|
|
|
var s = this.getRoomLists();
|
|
|
|
this.setState(s);
|
|
|
|
},
|
|
|
|
|
|
|
|
componentDidMount: function() {
|
|
|
|
this.dispatcherRef = dis.register(this.onAction);
|
|
|
|
},
|
|
|
|
|
|
|
|
onAction: function(payload) {
|
|
|
|
switch (payload.action) {
|
|
|
|
case 'view_tooltip':
|
|
|
|
this.tooltip = payload.tooltip;
|
|
|
|
this._repositionTooltip();
|
|
|
|
if (this.tooltip) this.tooltip.style.display = 'block';
|
2015-12-17 02:49:09 +00:00
|
|
|
break;
|
|
|
|
case 'call_state':
|
|
|
|
var call = CallHandler.getCall(payload.room_id);
|
|
|
|
if (call && call.call_state === 'ringing') {
|
|
|
|
this.setState({
|
|
|
|
incomingCall: call
|
|
|
|
});
|
|
|
|
this._repositionIncomingCallBox(undefined, true);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
this.setState({
|
|
|
|
incomingCall: null
|
|
|
|
});
|
|
|
|
}
|
|
|
|
break;
|
2015-11-30 16:55:00 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
componentWillUnmount: function() {
|
|
|
|
dis.unregister(this.dispatcherRef);
|
|
|
|
if (MatrixClientPeg.get()) {
|
|
|
|
MatrixClientPeg.get().removeListener("Room", this.onRoom);
|
2016-02-04 15:55:24 +00:00
|
|
|
MatrixClientPeg.get().removeListener("deleteRoom", this.onDeleteRoom);
|
2015-11-30 16:55:00 +00:00
|
|
|
MatrixClientPeg.get().removeListener("Room.timeline", this.onRoomTimeline);
|
|
|
|
MatrixClientPeg.get().removeListener("Room.name", this.onRoomName);
|
2016-02-04 15:55:24 +00:00
|
|
|
MatrixClientPeg.get().removeListener("Room.tags", this.onRoomTags);
|
|
|
|
MatrixClientPeg.get().removeListener("Room.receipt", this.onRoomReceipt);
|
2015-11-30 16:55:00 +00:00
|
|
|
MatrixClientPeg.get().removeListener("RoomState.events", this.onRoomStateEvents);
|
2016-02-04 15:55:24 +00:00
|
|
|
MatrixClientPeg.get().removeListener("RoomMember.name", this.onRoomMemberName);
|
2015-11-30 16:55:00 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
onRoom: function(room) {
|
2015-12-18 15:13:59 +00:00
|
|
|
this._delayedRefreshRoomList();
|
2015-11-30 16:55:00 +00:00
|
|
|
},
|
|
|
|
|
2015-12-16 16:27:46 +00:00
|
|
|
onDeleteRoom: function(roomId) {
|
2015-12-18 15:13:59 +00:00
|
|
|
this._delayedRefreshRoomList();
|
2015-12-16 16:27:46 +00:00
|
|
|
},
|
|
|
|
|
2015-12-18 11:55:43 +00:00
|
|
|
onArchivedHeaderClick: function(isHidden) {
|
|
|
|
if (!isHidden) {
|
2015-12-18 15:13:59 +00:00
|
|
|
var self = this;
|
|
|
|
this.setState({ isLoadingLeftRooms: true });
|
2015-12-18 11:55:43 +00:00
|
|
|
// we don't care about the response since it comes down via "Room"
|
|
|
|
// events.
|
|
|
|
MatrixClientPeg.get().syncLeftRooms().catch(function(err) {
|
|
|
|
console.error("Failed to sync left rooms: %s", err);
|
|
|
|
console.error(err);
|
2015-12-18 15:13:59 +00:00
|
|
|
}).finally(function() {
|
|
|
|
self.setState({ isLoadingLeftRooms: false });
|
2015-12-18 11:55:43 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2015-11-30 16:55:00 +00:00
|
|
|
onRoomTimeline: function(ev, room, toStartOfTimeline) {
|
|
|
|
if (toStartOfTimeline) return;
|
2016-02-25 11:06:47 +00:00
|
|
|
this._delayedRefreshRoomList();
|
2015-11-30 16:55:00 +00:00
|
|
|
},
|
|
|
|
|
2015-12-18 17:51:17 +00:00
|
|
|
onRoomReceipt: function(receiptEvent, room) {
|
|
|
|
// because if we read a notification, it will affect notification count
|
2016-01-07 10:38:44 +00:00
|
|
|
// only bother updating if there's a receipt from us
|
|
|
|
var receiptKeys = Object.keys(receiptEvent.getContent());
|
|
|
|
for (var i = 0; i < receiptKeys.length; ++i) {
|
|
|
|
var rcpt = receiptEvent.getContent()[receiptKeys[i]];
|
|
|
|
if (rcpt['m.read'] && rcpt['m.read'][MatrixClientPeg.get().credentials.userId]) {
|
2016-02-25 11:06:47 +00:00
|
|
|
this._delayedRefreshRoomList();
|
2016-01-07 10:38:44 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2015-12-18 17:51:17 +00:00
|
|
|
},
|
|
|
|
|
2015-11-30 16:55:00 +00:00
|
|
|
onRoomName: function(room) {
|
2015-12-18 15:13:59 +00:00
|
|
|
this._delayedRefreshRoomList();
|
2015-11-30 16:55:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
onRoomTags: function(event, room) {
|
2015-12-18 15:13:59 +00:00
|
|
|
this._delayedRefreshRoomList();
|
2015-11-30 16:55:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
onRoomStateEvents: function(ev, state) {
|
2015-12-18 15:13:59 +00:00
|
|
|
this._delayedRefreshRoomList();
|
2015-11-30 16:55:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
onRoomMemberName: function(ev, member) {
|
2015-12-18 15:13:59 +00:00
|
|
|
this._delayedRefreshRoomList();
|
|
|
|
},
|
|
|
|
|
2016-02-04 18:06:24 +00:00
|
|
|
_delayedRefreshRoomList: new rate_limited_func(function() {
|
|
|
|
this.refreshRoomList();
|
|
|
|
}, 500),
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
refreshRoomList: function() {
|
2015-12-18 15:13:59 +00:00
|
|
|
// console.log("DEBUG: Refresh room list delta=%s ms",
|
|
|
|
// (!this._lastRefreshRoomListTs ? "-" : (Date.now() - this._lastRefreshRoomListTs))
|
|
|
|
// );
|
|
|
|
|
2015-11-30 16:55:00 +00:00
|
|
|
// TODO: rather than bluntly regenerating and re-sorting everything
|
|
|
|
// every time we see any kind of room change from the JS SDK
|
|
|
|
// we could do incremental updates on our copy of the state
|
|
|
|
// based on the room which has actually changed. This would stop
|
|
|
|
// us re-rendering all the sublists every time anything changes anywhere
|
|
|
|
// in the state of the client.
|
|
|
|
this.setState(this.getRoomLists());
|
2015-12-18 15:13:59 +00:00
|
|
|
this._lastRefreshRoomListTs = Date.now();
|
2015-11-30 16:55:00 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
getRoomLists: function() {
|
|
|
|
var self = this;
|
|
|
|
var s = { lists: {} };
|
|
|
|
|
2015-12-11 00:40:28 +00:00
|
|
|
s.lists["im.vector.fake.invite"] = [];
|
2015-11-30 16:55:00 +00:00
|
|
|
s.lists["m.favourite"] = [];
|
2015-12-11 00:40:28 +00:00
|
|
|
s.lists["im.vector.fake.recent"] = [];
|
2015-11-30 16:55:00 +00:00
|
|
|
s.lists["m.lowpriority"] = [];
|
2015-12-11 00:40:28 +00:00
|
|
|
s.lists["im.vector.fake.archived"] = [];
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
MatrixClientPeg.get().getRooms().forEach(function(room) {
|
|
|
|
var me = room.getMember(MatrixClientPeg.get().credentials.userId);
|
2016-03-18 19:59:58 +00:00
|
|
|
if (!me) return;
|
2015-11-30 16:55:00 +00:00
|
|
|
|
2016-03-18 20:08:47 +00:00
|
|
|
// console.log("room = " + room.name + ", me.membership = " + me.membership +
|
|
|
|
// ", sender = " + me.events.member.getSender() +
|
|
|
|
// ", target = " + me.events.member.getStateKey() +
|
|
|
|
// ", prevMembership = " + me.events.member.getPrevContent().membership);
|
|
|
|
|
2016-03-18 19:59:58 +00:00
|
|
|
if (me.membership == "invite") {
|
2015-12-11 00:40:28 +00:00
|
|
|
s.lists["im.vector.fake.invite"].push(room);
|
2015-11-30 16:55:00 +00:00
|
|
|
}
|
2016-03-18 19:59:58 +00:00
|
|
|
else if (me.membership == "join" || me.membership === "ban" ||
|
2016-03-18 20:08:47 +00:00
|
|
|
(me.membership === "leave" && me.events.member.getSender() !== me.events.member.getStateKey()))
|
|
|
|
{
|
2016-03-18 19:59:58 +00:00
|
|
|
var shouldShowRoom = true;
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
// hiding conf rooms only ever toggles shouldShowRoom to false
|
2016-03-18 19:59:58 +00:00
|
|
|
if (HIDE_CONFERENCE_CHANS) {
|
2015-11-30 16:55:00 +00:00
|
|
|
// we want to hide the 1:1 conf<->user room and not the group chat
|
|
|
|
var joinedMembers = room.getJoinedMembers();
|
|
|
|
if (joinedMembers.length === 2) {
|
|
|
|
var otherMember = joinedMembers.filter(function(m) {
|
|
|
|
return m.userId !== me.userId
|
|
|
|
})[0];
|
|
|
|
var ConfHandler = self.props.ConferenceHandler;
|
2015-12-16 11:54:29 +00:00
|
|
|
if (ConfHandler && ConfHandler.isConferenceUser(otherMember.userId)) {
|
2015-11-30 16:55:00 +00:00
|
|
|
// console.log("Hiding conference 1:1 room %s", room.roomId);
|
|
|
|
shouldShowRoom = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (shouldShowRoom) {
|
|
|
|
var tagNames = Object.keys(room.tags);
|
|
|
|
if (tagNames.length) {
|
|
|
|
for (var i = 0; i < tagNames.length; i++) {
|
|
|
|
var tagName = tagNames[i];
|
|
|
|
s.lists[tagName] = s.lists[tagName] || [];
|
|
|
|
s.lists[tagNames[i]].push(room);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2015-12-11 00:40:28 +00:00
|
|
|
s.lists["im.vector.fake.recent"].push(room);
|
2015-11-30 16:55:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-03-18 19:59:58 +00:00
|
|
|
else if (me.membership === "leave") {
|
|
|
|
s.lists["im.vector.fake.archived"].push(room);
|
|
|
|
}
|
|
|
|
else {
|
2016-03-18 20:01:19 +00:00
|
|
|
console.error("unrecognised membership: " + me.membership + " - this should never happen");
|
2016-03-18 19:59:58 +00:00
|
|
|
}
|
2015-11-30 16:55:00 +00:00
|
|
|
});
|
|
|
|
|
2015-12-11 00:40:28 +00:00
|
|
|
//console.log("calculated new roomLists; im.vector.fake.recent = " + s.lists["im.vector.fake.recent"]);
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
// we actually apply the sorting to this when receiving the prop in RoomSubLists.
|
|
|
|
|
|
|
|
return s;
|
|
|
|
},
|
|
|
|
|
2015-12-17 02:49:09 +00:00
|
|
|
_getScrollNode: function() {
|
|
|
|
var panel = ReactDOM.findDOMNode(this);
|
|
|
|
if (!panel) return null;
|
|
|
|
|
|
|
|
if (panel.classList.contains('gm-prevented')) {
|
|
|
|
return panel;
|
|
|
|
} else {
|
|
|
|
return panel.children[2]; // XXX: Fragile!
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
_repositionTooltips: function(e) {
|
|
|
|
this._repositionTooltip(e);
|
|
|
|
this._repositionIncomingCallBox(e, false);
|
|
|
|
},
|
|
|
|
|
2015-11-30 16:55:00 +00:00
|
|
|
_repositionTooltip: function(e) {
|
|
|
|
if (this.tooltip && this.tooltip.parentElement) {
|
|
|
|
var scroll = ReactDOM.findDOMNode(this);
|
2015-12-17 02:49:09 +00:00
|
|
|
this.tooltip.style.top = (scroll.parentElement.offsetTop + this.tooltip.parentElement.offsetTop - this._getScrollNode().scrollTop) + "px";
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
_repositionIncomingCallBox: function(e, firstTime) {
|
|
|
|
var incomingCallBox = document.getElementById("incomingCallBox");
|
|
|
|
if (incomingCallBox && incomingCallBox.parentElement) {
|
|
|
|
var scroll = this._getScrollNode();
|
|
|
|
var top = (scroll.offsetTop + incomingCallBox.parentElement.offsetTop - scroll.scrollTop);
|
|
|
|
|
|
|
|
if (firstTime) {
|
|
|
|
// scroll to make sure the callbox is on the screen...
|
2015-12-17 14:56:09 +00:00
|
|
|
if (top < 10) { // 10px of vertical margin at top of screen
|
2015-12-17 02:49:09 +00:00
|
|
|
scroll.scrollTop = incomingCallBox.parentElement.offsetTop - 10;
|
|
|
|
}
|
2015-12-17 14:56:09 +00:00
|
|
|
else if (top > scroll.clientHeight - incomingCallBox.offsetHeight + 50) {
|
|
|
|
scroll.scrollTop = incomingCallBox.parentElement.offsetTop - scroll.offsetHeight + incomingCallBox.offsetHeight - 50;
|
2015-12-17 02:49:09 +00:00
|
|
|
}
|
|
|
|
// recalculate top in case we clipped it.
|
|
|
|
top = (scroll.offsetTop + incomingCallBox.parentElement.offsetTop - scroll.scrollTop);
|
|
|
|
}
|
2015-12-17 14:56:09 +00:00
|
|
|
else {
|
|
|
|
// stop the box from scrolling off the screen
|
|
|
|
if (top < 10) {
|
|
|
|
top = 10;
|
|
|
|
}
|
|
|
|
else if (top > scroll.clientHeight - incomingCallBox.offsetHeight + 50) {
|
|
|
|
top = scroll.clientHeight - incomingCallBox.offsetHeight + 50;
|
|
|
|
}
|
|
|
|
}
|
2015-12-17 02:49:09 +00:00
|
|
|
|
2016-02-19 02:21:17 +00:00
|
|
|
// slightly ugly hack to offset if there's a toolbar present.
|
|
|
|
// we really should be calculating our absolute offsets of top by recursing through the DOM
|
|
|
|
toolbar = document.getElementsByClassName("mx_MatrixToolbar")[0];
|
|
|
|
if (toolbar) {
|
|
|
|
top += toolbar.offsetHeight;
|
|
|
|
}
|
|
|
|
|
2015-12-17 02:49:09 +00:00
|
|
|
incomingCallBox.style.top = top + "px";
|
|
|
|
incomingCallBox.style.left = scroll.offsetLeft + scroll.offsetWidth + "px";
|
2015-11-30 16:55:00 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
onShowClick: function() {
|
|
|
|
dis.dispatch({
|
|
|
|
action: 'show_left_panel',
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2016-01-22 15:46:38 +00:00
|
|
|
onShowMoreRooms: function() {
|
|
|
|
// kick gemini in the balls to get it to wake up
|
|
|
|
// XXX: uuuuuuugh.
|
|
|
|
this.refs.gemscroll.forceUpdate();
|
|
|
|
},
|
|
|
|
|
2015-11-30 16:55:00 +00:00
|
|
|
render: function() {
|
|
|
|
var expandButton = this.props.collapsed ?
|
|
|
|
<img className="mx_RoomList_expandButton" onClick={ this.onShowClick } src="img/menu.png" width="20" alt=">"/> :
|
|
|
|
null;
|
|
|
|
|
2015-12-01 15:45:11 +00:00
|
|
|
var RoomSubList = sdk.getComponent('structures.RoomSubList');
|
2015-11-30 16:55:00 +00:00
|
|
|
var self = this;
|
|
|
|
|
|
|
|
return (
|
2016-01-22 15:46:38 +00:00
|
|
|
<GeminiScrollbar className="mx_RoomList_scrollbar" autoshow={true} onScroll={ self._repositionTooltips } ref="gemscroll">
|
2015-11-30 16:55:00 +00:00
|
|
|
<div className="mx_RoomList">
|
|
|
|
{ expandButton }
|
|
|
|
|
2015-12-11 00:40:28 +00:00
|
|
|
<RoomSubList list={ self.state.lists['im.vector.fake.invite'] }
|
2015-11-30 16:55:00 +00:00
|
|
|
label="Invites"
|
|
|
|
editable={ false }
|
|
|
|
order="recent"
|
|
|
|
selectedRoom={ self.props.selectedRoom }
|
2015-12-17 02:49:09 +00:00
|
|
|
incomingCall={ self.state.incomingCall }
|
2016-01-22 15:46:38 +00:00
|
|
|
collapsed={ self.props.collapsed }
|
|
|
|
onShowMoreRooms={ this.onShowMoreRooms } />
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
<RoomSubList list={ self.state.lists['m.favourite'] }
|
|
|
|
label="Favourites"
|
|
|
|
tagName="m.favourite"
|
|
|
|
verb="favourite"
|
|
|
|
editable={ true }
|
|
|
|
order="manual"
|
|
|
|
selectedRoom={ self.props.selectedRoom }
|
2015-12-17 02:49:09 +00:00
|
|
|
incomingCall={ self.state.incomingCall }
|
2016-01-22 15:46:38 +00:00
|
|
|
collapsed={ self.props.collapsed }
|
|
|
|
onShowMoreRooms={ this.onShowMoreRooms } />
|
2015-11-30 16:55:00 +00:00
|
|
|
|
2015-12-11 00:40:28 +00:00
|
|
|
<RoomSubList list={ self.state.lists['im.vector.fake.recent'] }
|
2015-12-17 16:27:56 +00:00
|
|
|
label="Rooms"
|
2015-11-30 16:55:00 +00:00
|
|
|
editable={ true }
|
|
|
|
verb="restore"
|
|
|
|
order="recent"
|
|
|
|
selectedRoom={ self.props.selectedRoom }
|
2015-12-17 02:49:09 +00:00
|
|
|
incomingCall={ self.state.incomingCall }
|
2016-01-22 15:46:38 +00:00
|
|
|
collapsed={ self.props.collapsed }
|
|
|
|
onShowMoreRooms={ this.onShowMoreRooms } />
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
{ Object.keys(self.state.lists).map(function(tagName) {
|
2015-12-11 00:40:28 +00:00
|
|
|
if (!tagName.match(/^(m\.(favourite|lowpriority)|im\.vector\.fake\.(invite|recent|archived))$/)) {
|
2015-11-30 16:55:00 +00:00
|
|
|
return <RoomSubList list={ self.state.lists[tagName] }
|
|
|
|
key={ tagName }
|
|
|
|
label={ tagName }
|
|
|
|
tagName={ tagName }
|
|
|
|
verb={ "tag as " + tagName }
|
|
|
|
editable={ true }
|
|
|
|
order="manual"
|
|
|
|
selectedRoom={ self.props.selectedRoom }
|
2015-12-17 02:49:09 +00:00
|
|
|
incomingCall={ self.state.incomingCall }
|
2016-01-22 15:46:38 +00:00
|
|
|
collapsed={ self.props.collapsed }
|
2016-01-28 09:41:46 +00:00
|
|
|
onShowMoreRooms={ self.onShowMoreRooms } />
|
2015-11-30 16:55:00 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}) }
|
|
|
|
|
|
|
|
<RoomSubList list={ self.state.lists['m.lowpriority'] }
|
|
|
|
label="Low priority"
|
|
|
|
tagName="m.lowpriority"
|
|
|
|
verb="demote"
|
|
|
|
editable={ true }
|
|
|
|
order="recent"
|
|
|
|
selectedRoom={ self.props.selectedRoom }
|
2015-12-17 02:49:09 +00:00
|
|
|
incomingCall={ self.state.incomingCall }
|
2016-01-22 15:46:38 +00:00
|
|
|
collapsed={ self.props.collapsed }
|
|
|
|
onShowMoreRooms={ this.onShowMoreRooms } />
|
2015-11-30 16:55:00 +00:00
|
|
|
|
2015-12-11 00:40:28 +00:00
|
|
|
<RoomSubList list={ self.state.lists['im.vector.fake.archived'] }
|
2015-11-30 16:55:00 +00:00
|
|
|
label="Historical"
|
|
|
|
editable={ false }
|
|
|
|
order="recent"
|
|
|
|
selectedRoom={ self.props.selectedRoom }
|
2015-12-18 11:55:43 +00:00
|
|
|
collapsed={ self.props.collapsed }
|
|
|
|
alwaysShowHeader={ true }
|
2015-12-18 15:13:59 +00:00
|
|
|
startAsHidden={ true }
|
|
|
|
showSpinner={ self.state.isLoadingLeftRooms }
|
2015-12-18 16:59:25 +00:00
|
|
|
onHeaderClick= { self.onArchivedHeaderClick }
|
2016-01-22 15:46:38 +00:00
|
|
|
incomingCall={ self.state.incomingCall }
|
|
|
|
onShowMoreRooms={ this.onShowMoreRooms } />
|
2015-11-30 16:55:00 +00:00
|
|
|
</div>
|
|
|
|
</GeminiScrollbar>
|
|
|
|
);
|
|
|
|
}
|
2015-12-04 14:24:02 +00:00
|
|
|
});
|