Merge branch 'master' into develop
commit
7ce8ab0fd0
|
@ -1,3 +1,10 @@
|
||||||
|
Changes in [1.0.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.0.1) (2019-02-15)
|
||||||
|
===================================================================================================
|
||||||
|
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.0.0...v1.0.1)
|
||||||
|
|
||||||
|
* Fix community invites crashing the app
|
||||||
|
[\#2650](https://github.com/matrix-org/matrix-react-sdk/pull/2650)
|
||||||
|
|
||||||
Changes in [1.0.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.0.0) (2019-02-14)
|
Changes in [1.0.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.0.0) (2019-02-14)
|
||||||
===================================================================================================
|
===================================================================================================
|
||||||
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.0.0-rc.2...v1.0.0)
|
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.0.0-rc.2...v1.0.0)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "matrix-react-sdk",
|
"name": "matrix-react-sdk",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "SDK for matrix.org using React",
|
"description": "SDK for matrix.org using React",
|
||||||
"author": "matrix.org",
|
"author": "matrix.org",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -191,3 +191,7 @@ limitations under the License.
|
||||||
.mx_RoomTile.mx_RoomTile_transparent:focus {
|
.mx_RoomTile.mx_RoomTile_transparent:focus {
|
||||||
background-color: $roomtile-transparent-focused-color;
|
background-color: $roomtile-transparent-focused-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_GroupInviteTile .mx_RoomTile_name {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
|
@ -282,18 +282,10 @@ const RoomSubList = React.createClass({
|
||||||
this.setState({scrollTop: this.refs.scroller.getScrollTop()});
|
this.setState({scrollTop: this.refs.scroller.getScrollTop()});
|
||||||
},
|
},
|
||||||
|
|
||||||
_getRenderItems: function() {
|
_canUseLazyListRendering() {
|
||||||
// try our best to not create a new array
|
// for now disable lazy rendering as they are already rendered tiles
|
||||||
// because LazyRenderList rerender when the items prop
|
// not rooms like props.list we pass to LazyRenderList
|
||||||
// is not the same object as the previous value
|
return !this.props.extraTiles || !this.props.extraTiles.length;
|
||||||
const {list, extraTiles} = this.props;
|
|
||||||
if (!extraTiles || !extraTiles.length) {
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
if (!list || list.length) {
|
|
||||||
return extraTiles;
|
|
||||||
}
|
|
||||||
return list.concat(extraTiles);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
@ -310,7 +302,7 @@ const RoomSubList = React.createClass({
|
||||||
return <div ref="subList" className={subListClasses}>
|
return <div ref="subList" className={subListClasses}>
|
||||||
{this._getHeaderJsx(isCollapsed)}
|
{this._getHeaderJsx(isCollapsed)}
|
||||||
</div>;
|
</div>;
|
||||||
} else {
|
} else if (this._canUseLazyListRendering()) {
|
||||||
return <div ref="subList" className={subListClasses}>
|
return <div ref="subList" className={subListClasses}>
|
||||||
{this._getHeaderJsx(isCollapsed)}
|
{this._getHeaderJsx(isCollapsed)}
|
||||||
<IndicatorScrollbar ref="scroller" className="mx_RoomSubList_scroll" onScroll={ this._onScroll }>
|
<IndicatorScrollbar ref="scroller" className="mx_RoomSubList_scroll" onScroll={ this._onScroll }>
|
||||||
|
@ -319,7 +311,16 @@ const RoomSubList = React.createClass({
|
||||||
height={ this.state.scrollerHeight }
|
height={ this.state.scrollerHeight }
|
||||||
renderItem={ this.makeRoomTile }
|
renderItem={ this.makeRoomTile }
|
||||||
itemHeight={34}
|
itemHeight={34}
|
||||||
items={this._getRenderItems()} />
|
items={ this.props.list } />
|
||||||
|
</IndicatorScrollbar>
|
||||||
|
</div>;
|
||||||
|
} else {
|
||||||
|
const roomTiles = this.props.list.map(r => this.makeRoomTile(r));
|
||||||
|
const tiles = roomTiles.concat(this.props.extraTiles);
|
||||||
|
return <div ref="subList" className={subListClasses}>
|
||||||
|
{this._getHeaderJsx(isCollapsed)}
|
||||||
|
<IndicatorScrollbar ref="scroller" className="mx_RoomSubList_scroll" onScroll={ this._onScroll }>
|
||||||
|
{ tiles }
|
||||||
</IndicatorScrollbar>
|
</IndicatorScrollbar>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,7 @@ export default React.createClass({
|
||||||
const classes = classNames('mx_RoomTile mx_RoomTile_highlight', {
|
const classes = classNames('mx_RoomTile mx_RoomTile_highlight', {
|
||||||
'mx_RoomTile_menuDisplayed': this.state.menuDisplayed,
|
'mx_RoomTile_menuDisplayed': this.state.menuDisplayed,
|
||||||
'mx_RoomTile_selected': this.state.selected,
|
'mx_RoomTile_selected': this.state.selected,
|
||||||
|
'mx_GroupInviteTile': true,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue