about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/search.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-27 05:49:50 +0200
committerGitHub <noreply@github.com>2019-07-27 05:49:50 +0200
commit8a4674f2c3d89c998eb5438b96b7977dc2be3167 (patch)
tree5c20c0ff19beb4e911dc527d1f22c8a1ba26dcba /app/javascript/mastodon/reducers/search.js
parentb9fbcbfe4e0a15fcf8a457ce17ea080f0eb939fc (diff)
Add search results pagination to web UI (#11409)
* Add search results pagination to web UI

Fix #10737

* Fix code style issue
Diffstat (limited to 'app/javascript/mastodon/reducers/search.js')
-rw-r--r--app/javascript/mastodon/reducers/search.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/search.js b/app/javascript/mastodon/reducers/search.js
index 77b7f588c..f437ff217 100644
--- a/app/javascript/mastodon/reducers/search.js
+++ b/app/javascript/mastodon/reducers/search.js
@@ -3,6 +3,7 @@ import {
   SEARCH_CLEAR,
   SEARCH_FETCH_SUCCESS,
   SEARCH_SHOW,
+  SEARCH_EXPAND_SUCCESS,
 } from '../actions/search';
 import {
   COMPOSE_MENTION,
@@ -42,6 +43,8 @@ export default function search(state = initialState, action) {
       statuses: ImmutableList(action.results.statuses.map(item => item.id)),
       hashtags: fromJS(action.results.hashtags),
     })).set('submitted', true).set('searchTerm', action.searchTerm);
+  case SEARCH_EXPAND_SUCCESS:
+    return state.updateIn(['results', action.searchType], list => list.concat(action.results[action.searchType].map(item => item.id)));
   default:
     return state;
   }