Add a 'No results' marker when there are no search results at all.

Also reword the 'no more results' marker.
This commit is contained in:
Richard van der Hoff 2015-12-21 13:46:27 +00:00
parent 765e5bdeb1
commit 7c285f9ad0

View file

@ -642,10 +642,17 @@ module.exports = React.createClass({
var lastRoomId;
if (this.state.searchCanPaginate === false) {
if (this.state.searchResults.length == 0) {
ret.push(<li key="search-top-marker">
<h2 className="mx_RoomView_topMarker">End of search results</h2>
<h2 className="mx_RoomView_topMarker">No results</h2>
</li>
);
} else {
ret.push(<li key="search-top-marker">
<h2 className="mx_RoomView_topMarker">No more results</h2>
</li>
);
}
}
for (var i = this.state.searchResults.length - 1; i >= 0; i--) {