From abbaa8bf786839c2c187068e5e757716b57bfdb0 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 12 Aug 2020 13:02:19 -0400 Subject: [PATCH] always batch resolve search results --- ui/redux/actions/search.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ui/redux/actions/search.js b/ui/redux/actions/search.js index 5f11c15e6..a7356c16e 100644 --- a/ui/redux/actions/search.js +++ b/ui/redux/actions/search.js @@ -1,6 +1,6 @@ // @flow import * as ACTIONS from 'constants/action_types'; -import { buildURI, doResolveUri, batchActions } from 'lbry-redux'; +import { buildURI, doResolveUris, batchActions } from 'lbry-redux'; import { makeSelectSearchUris, selectSuggestions, @@ -20,7 +20,6 @@ type SearchOptions = { related_to?: string, nsfw?: boolean, isBackgroundSearch?: boolean, - resolveResults?: boolean, }; // We can't use env's because they aren't passed into node_modules @@ -84,7 +83,6 @@ export const doSearch = (rawQuery: string, searchOptions: SearchOptions) => ( getState: GetState ) => { const query = rawQuery.replace(/^lbry:\/\//i, '').replace(/\//, ' '); - const resolveResults = searchOptions && searchOptions.resolveResults; const isBackgroundSearch = (searchOptions && searchOptions.isBackgroundSearch) || false; if (!query) { @@ -136,13 +134,12 @@ export const doSearch = (rawQuery: string, searchOptions: SearchOptions) => ( } const url = buildURI(urlObj); - if (resolveResults) { - actions.push(doResolveUri(url)); - } uris.push(url); } }); + actions.push(doResolveUris(uris)); + actions.push({ type: ACTIONS.SEARCH_SUCCESS, data: {