Merge commit '99d2392' into rav/roomview_works

Conflicts:
	src/components/structures/RoomView.js
This commit is contained in:
Richard van der Hoff 2016-02-23 13:32:23 +00:00
commit ac4b36c0dd
7 changed files with 57 additions and 10 deletions

View file

@ -722,6 +722,15 @@ module.exports = React.createClass({
}
}
// once images in the search results load, make the scrollPanel check
// the scroll offsets.
var onImageLoad = () => {
var scrollPanel = this.refs.searchResultsPanel;
if (scrollPanel) {
scrollPanel.checkScroll();
}
}
var lastRoomId;
for (var i = this.state.searchResults.results.length - 1; i >= 0; i--) {
@ -758,7 +767,8 @@ module.exports = React.createClass({
ret.push(<SearchResultTile key={mxEv.getId()}
searchResult={result}
searchHighlights={this.state.searchHighlights}
resultLink={resultLink}/>);
resultLink={resultLink}
onImageLoad={onImageLoad}/>);
}
return ret;
},