You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-06-27 15:01:53 +03:00
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:
@ -642,10 +642,17 @@ module.exports = React.createClass({
|
|||||||
var lastRoomId;
|
var lastRoomId;
|
||||||
|
|
||||||
if (this.state.searchCanPaginate === false) {
|
if (this.state.searchCanPaginate === false) {
|
||||||
|
if (this.state.searchResults.length == 0) {
|
||||||
ret.push(<li key="search-top-marker">
|
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>
|
</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--) {
|
for (var i = this.state.searchResults.length - 1; i >= 0; i--) {
|
||||||
|
Reference in New Issue
Block a user