add optional resolveResults parameter to doSearch
This commit is contained in:
parent
abe90e0665
commit
2c569a729b
2 changed files with 9 additions and 4 deletions
6
dist/bundle.es.js
vendored
6
dist/bundle.es.js
vendored
|
@ -3910,7 +3910,7 @@ const doUpdateSearchQuery = (query, shouldSkipSuggestions) => dispatch => {
|
|||
|
||||
const doSearch = (rawQuery, // pass in a query if you don't want to search for what's in the search bar
|
||||
size, // only pass in if you don't want to use the users setting (ex: related content)
|
||||
from, isBackgroundSearch = false) => (dispatch, getState) => {
|
||||
from, isBackgroundSearch = false, resolveResults = true) => (dispatch, getState) => {
|
||||
const query = rawQuery.replace(/^lbry:\/\//i, '').replace(/\//, ' ');
|
||||
|
||||
if (!query) {
|
||||
|
@ -3959,7 +3959,9 @@ from, isBackgroundSearch = false) => (dispatch, getState) => {
|
|||
}
|
||||
|
||||
const url = buildURI(urlObj);
|
||||
actions.push(doResolveUri(url));
|
||||
if (resolveResults) {
|
||||
actions.push(doResolveUri(url));
|
||||
}
|
||||
uris.push(url);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -78,7 +78,8 @@ export const doSearch = (
|
|||
rawQuery: string, // pass in a query if you don't want to search for what's in the search bar
|
||||
size: ?number, // only pass in if you don't want to use the users setting (ex: related content)
|
||||
from: ?number,
|
||||
isBackgroundSearch: boolean = false
|
||||
isBackgroundSearch: boolean = false,
|
||||
resolveResults: boolean = true,
|
||||
) => (dispatch: Dispatch, getState: GetState) => {
|
||||
const query = rawQuery.replace(/^lbry:\/\//i, '').replace(/\//, ' ');
|
||||
|
||||
|
@ -130,7 +131,9 @@ export const doSearch = (
|
|||
}
|
||||
|
||||
const url = buildURI(urlObj);
|
||||
actions.push(doResolveUri(url));
|
||||
if (resolveResults) {
|
||||
actions.push(doResolveUri(url));
|
||||
}
|
||||
uris.push(url);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue