Fix "exact match" being applied to Recommended #6460

Merged
infinite-persistence merged 2 commits from ip/fix.exact.match.search into master 2021-07-14 05:18:55 +02:00
infinite-persistence commented 2021-07-13 08:42:12 +02:00 (Migrated from github.com)

Issue

Closes #6414 <Don't use "exact match" setting outside of main search - cuases no results in related>

doSearch was used in Wunderbar and Recommended, but it was adding in Wunderbar options all the time.

Changes

  • Fix doSearch to not use hardcoded options (take from arguments).
  • Refactors the searchOption-creation code so that we don't duplicate the logic in both .js and .jsx.
## Issue Closes #6414 <Don't use "exact match" setting outside of main search - cuases no results in related> `doSearch` was used in Wunderbar and Recommended, but it was adding in Wunderbar options all the time. ## Changes - Fix `doSearch` to not use hardcoded options (take from arguments). - Refactors the searchOption-creation code so that we don't duplicate the logic in both .js and .jsx.
jessopb (Migrated from github.com) approved these changes 2021-07-13 21:18:58 +02:00
@ -2,4 +2,3 @@
import { withRouter } from 'react-router';
import { doSearch } from 'redux/actions/search';
import { SIMPLE_SITE } from 'config';
import {
jessopb (Migrated from github.com) commented 2021-07-13 21:18:34 +02:00

the selectShowMature selector already accounts for SIMPLE_SITE. :)

export const selectShowMatureContent = !ENABLE_MATURE
  ? createSelector(() => false)
  : makeSelectClientSetting(SETTINGS.SHOW_MATURE);
the selectShowMature selector already accounts for SIMPLE_SITE. :) ``` export const selectShowMatureContent = !ENABLE_MATURE ? createSelector(() => false) : makeSelectClientSetting(SETTINGS.SHOW_MATURE); ```
infinite-persistence commented 2021-07-14 05:17:54 +02:00 (Migrated from github.com)

Update (1c5f99d to b822ae3)

  • Removed redundant SIMPLE_SITE check. Thanks, Jessop!
### Update (1c5f99d to b822ae3) - Removed redundant SIMPLE_SITE check. Thanks, Jessop!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#6460
No description provided.