mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +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,
|
onHeaderClick: PropTypes.func,
|
||||||
alwaysShowHeader: PropTypes.bool,
|
alwaysShowHeader: PropTypes.bool,
|
||||||
incomingCall: PropTypes.object,
|
incomingCall: PropTypes.object,
|
||||||
onShowMoreRooms: PropTypes.func,
|
|
||||||
searchFilter: PropTypes.string,
|
searchFilter: PropTypes.string,
|
||||||
emptyContent: PropTypes.node, // content shown if the list is empty
|
emptyContent: PropTypes.node, // content shown if the list is empty
|
||||||
headerItems: PropTypes.node, // content shown in the sublist header
|
headerItems: PropTypes.node, // content shown in the sublist header
|
||||||
@ -71,8 +70,6 @@ const RoomSubList = React.createClass({
|
|||||||
return {
|
return {
|
||||||
onHeaderClick: function() {
|
onHeaderClick: function() {
|
||||||
}, // NOP
|
}, // NOP
|
||||||
onShowMoreRooms: function() {
|
|
||||||
}, // NOP
|
|
||||||
extraTiles: [],
|
extraTiles: [],
|
||||||
isInvite: false,
|
isInvite: false,
|
||||||
showEmpty: true,
|
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
|
// The header isCollapsable, so the click is to be interpreted as collapse and truncation logic
|
||||||
const isHidden = !this.state.hidden;
|
const isHidden = !this.state.hidden;
|
||||||
this.setState({hidden: isHidden});
|
this.setState({hidden: isHidden});
|
||||||
this.props.onShowMoreRooms();
|
|
||||||
this.props.onHeaderClick(isHidden);
|
this.props.onHeaderClick(isHidden);
|
||||||
} else {
|
} else {
|
||||||
// The header is stuck, so the click is to be interpreted as a scroll to the header
|
// 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) {
|
_getEmptyContent: function(section) {
|
||||||
if (this.state.selectedTags.length > 0) {
|
if (this.state.selectedTags.length > 0) {
|
||||||
return null;
|
return null;
|
||||||
@ -508,9 +501,6 @@ module.exports = React.createClass({
|
|||||||
render: function() {
|
render: function() {
|
||||||
const RoomSubList = sdk.getComponent('structures.RoomSubList');
|
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;
|
const self = this;
|
||||||
|
|
||||||
@ -518,7 +508,6 @@ module.exports = React.createClass({
|
|||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
collapsed: self.props.collapsed,
|
collapsed: self.props.collapsed,
|
||||||
searchFilter: self.props.searchFilter,
|
searchFilter: self.props.searchFilter,
|
||||||
onShowMoreRooms: self.onShowMoreRooms,
|
|
||||||
showEmpty: showEmpty,
|
showEmpty: showEmpty,
|
||||||
incomingCall: self.state.incomingCall,
|
incomingCall: self.state.incomingCall,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user