diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-10-29 13:32:49 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-10-30 18:24:57 +0100 |
commit | eb307ec1bdb0acd1f90ebf338b9664a9c5b49f80 (patch) | |
tree | 3240e3ca23b113c427246eb9c7630e9ff13036a1 /app/javascript/flavours/glitch/actions | |
parent | eee36267d627ae08898d2b3301f56ce729055e82 (diff) |
[Glitch] Fix logged out search and changed logged-in search placeholder
Port 55af04b253435ae771b69c8b7cfe3fc7e3b18033 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/actions')
-rw-r--r-- | app/javascript/flavours/glitch/actions/search.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/actions/search.js b/app/javascript/flavours/glitch/actions/search.js index 776782693..f21c0058b 100644 --- a/app/javascript/flavours/glitch/actions/search.js +++ b/app/javascript/flavours/glitch/actions/search.js @@ -29,7 +29,8 @@ export function clearSearch() { export function submitSearch() { return (dispatch, getState) => { - const value = getState().getIn(['search', 'value']); + const value = getState().getIn(['search', 'value']); + const signedIn = !!getState().getIn(['meta', 'me']); if (value.length === 0) { dispatch(fetchSearchSuccess({ accounts: [], statuses: [], hashtags: [] }, '')); @@ -41,7 +42,7 @@ export function submitSearch() { api(getState).get('/api/v2/search', { params: { q: value, - resolve: true, + resolve: signedIn, limit: 10, }, }).then(response => { |