Call through to syncLeftRooms when the archived header is clicked

This commit is contained in:
Kegan Dougal 2015-12-18 11:55:43 +00:00
parent 8e4d0c0be7
commit 22635f251d

View file

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