mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
remove onShowMoreRooms, as room tiles & scrollbar rendered at same level
This commit is contained in:
parent
f14c2cf2b2
commit
ae8723451a
@ -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
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user