diff --git a/app/javascript/mastodon/features/compose/components/search_results.jsx b/app/javascript/mastodon/features/compose/components/search_results.jsx
index 3882dec362..ffdf6cf692 100644
--- a/app/javascript/mastodon/features/compose/components/search_results.jsx
+++ b/app/javascript/mastodon/features/compose/components/search_results.jsx
@@ -79,26 +79,28 @@ class SearchResults extends ImmutablePureComponent {
if (results.get('accounts') && results.get('accounts').size > 0) {
count += results.get('accounts').size;
+ const showMore = this.showMoreResults('accounts');
accounts = (
{results.get('accounts').map(accountId =>
)}
- {this.showMoreResults('accounts') &&
}
+ {showMore &&
}
);
}
if (results.get('statuses') && results.get('statuses').size > 0) {
count += results.get('statuses').size;
+ const showMore = this.showMoreResults('statuses');
statuses = (
{results.get('statuses').map(statusId => )}
- {this.showMoreResults('statuses') && }
+ {showMore && }
);
} else if(results.get('statuses') && results.get('statuses').size === 0 && !searchEnabled && !(searchTerm.startsWith('@') || searchTerm.startsWith('#') || searchTerm.includes(' '))) {
@@ -115,13 +117,14 @@ class SearchResults extends ImmutablePureComponent {
if (results.get('hashtags') && results.get('hashtags').size > 0) {
count += results.get('hashtags').size;
+ const showMore = this.showMoreResults('hashtags');
hashtags = (
{results.get('hashtags').map(hashtag => )}
- {this.showMoreResults('hashtags') && }
+ {showMore && }
);
}
diff --git a/app/javascript/mastodon/reducers/search.js b/app/javascript/mastodon/reducers/search.js
index 56ca3070c5..73d7eabef4 100644
--- a/app/javascript/mastodon/reducers/search.js
+++ b/app/javascript/mastodon/reducers/search.js
@@ -67,7 +67,7 @@ export default function search(state = initialState, action) {
});
case SEARCH_EXPAND_SUCCESS:
const results = action.searchType === 'hashtags' ? fromJS(action.results.hashtags) : action.results[action.searchType].map(item => item.id);
- return state.updateIn(['results', action.searchType], list => list.concat(results)).updateIn(['noMoreResults', action.searchType], results.size <= 0);
+ return state.updateIn(['results', action.searchType], list => list.concat(results)).setIn(['noMoreResults', action.searchType], results.size <= 0);
default:
return state;
}