remove onShowMoreRooms, as room tiles & scrollbar rendered at same level

pull/21833/head
Bruno Windels 2018-10-19 14:27:36 +02:00
parent f14c2cf2b2
commit ae8723451a
2 changed files with 0 additions and 15 deletions

View File

@ -52,7 +52,6 @@ const RoomSubList = React.createClass({
onHeaderClick: PropTypes.func,
alwaysShowHeader: PropTypes.bool,
incomingCall: PropTypes.object,
onShowMoreRooms: PropTypes.func,
searchFilter: PropTypes.string,
emptyContent: PropTypes.node, // content shown if the list is empty
headerItems: PropTypes.node, // content shown in the sublist header
@ -71,8 +70,6 @@ const RoomSubList = React.createClass({
return {
onHeaderClick: function() {
}, // NOP
onShowMoreRooms: function() {
}, // NOP
extraTiles: [],
isInvite: false,
showEmpty: true,
@ -138,7 +135,6 @@ const RoomSubList = React.createClass({
// The header isCollapsable, so the click is to be interpreted as collapse and truncation logic
const isHidden = !this.state.hidden;
this.setState({hidden: isHidden});
this.props.onShowMoreRooms();
this.props.onHeaderClick(isHidden);
} else {
// The header is stuck, so the click is to be interpreted as a scroll to the header

View File

@ -406,13 +406,6 @@ module.exports = React.createClass({
}
},
onShowMoreRooms: function() {
// kick gemini in the balls to get it to wake up
// XXX: uuuuuuugh.
if (!this._gemScroll) return;
this._gemScroll.forceUpdate();
},
_getEmptyContent: function(section) {
if (this.state.selectedTags.length > 0) {
return null;
@ -508,9 +501,6 @@ module.exports = React.createClass({
render: function() {
const RoomSubList = sdk.getComponent('structures.RoomSubList');
// XXX: we can't detect device-level (localStorage) settings onChange as the SettingsStore does not notify
// so checking on every render is the sanest thing at this time.
const showEmpty = SettingsStore.getValue('RoomSubList.showEmpty');
const self = this;
@ -518,7 +508,6 @@ module.exports = React.createClass({
const defaultProps = {
collapsed: self.props.collapsed,
searchFilter: self.props.searchFilter,
onShowMoreRooms: self.onShowMoreRooms,
showEmpty: showEmpty,
incomingCall: self.state.incomingCall,
};