Call through to syncLeftRooms when the archived header is clicked

pull/21833/head
Kegan Dougal 2015-12-18 11:55:43 +00:00
parent 8e4d0c0be7
commit 22635f251d
1 changed files with 15 additions and 2 deletions

View File

@ -96,6 +96,17 @@ module.exports = React.createClass({
this.refreshRoomList();
},
onArchivedHeaderClick: function(isHidden) {
if (!isHidden) {
// 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);
});
}
},
onRoomTimeline: function(ev, room, toStartOfTimeline) {
if (toStartOfTimeline) return;
@ -295,7 +306,7 @@ module.exports = React.createClass({
verb="demote"
editable={ true }
order="recent"
bottommost={ self.state.lists['im.vector.fake.archived'].length === 0 }
bottommost={ false }
activityMap={ self.state.activityMap }
selectedRoom={ self.props.selectedRoom }
collapsed={ self.props.collapsed } />
@ -307,7 +318,9 @@ module.exports = React.createClass({
bottommost={ true }
activityMap={ self.state.activityMap }
selectedRoom={ self.props.selectedRoom }
collapsed={ self.props.collapsed } />
collapsed={ self.props.collapsed }
alwaysShowHeader={ true }
onHeaderClick= { self.onArchivedHeaderClick } />
</div>
</GeminiScrollbar>
);