diff --git a/src/redux/selectors/search.js b/src/redux/selectors/search.js index b519425..e2f1c1a 100644 --- a/src/redux/selectors/search.js +++ b/src/redux/selectors/search.js @@ -57,20 +57,21 @@ export const selectSearchSuggestions: Array<SearchSuggestion> = createSelector( return []; } - const queryIsPrefix = query === 'lbry:' || query === 'lbry:/' || query === 'lbry://'; + const queryIsPrefix = + query === 'lbry:' || query === 'lbry:/' || query === 'lbry://' || query === 'lbry://@'; - if (query.startsWith('lbry://') && query !== 'lbry://') { + if (queryIsPrefix) { + // If it is a prefix, wait until something else comes to figure out what to do + return []; + } else if (query.startsWith('lbry://')) { // If it starts with a prefix, don't show any autocomplete results // They are probably typing/pasting in a lbry uri return [ { value: query, - type: SEARCH_TYPES.FILE, + type: query[7] === '@' ? SEARCH_TYPES.CHANNEL : SEARCH_TYPES.FILE, }, ]; - } else if (queryIsPrefix) { - // If it is a prefix, wait until something else comes to figure out what to do - return []; } let searchSuggestions = [];