Ignore "search in language" setting in Channel Page (#944)
It's confusing to see blank channel pages due to this setting.
This commit is contained in:
parent
69de63c436
commit
db5d0a70aa
2 changed files with 14 additions and 9 deletions
|
@ -179,6 +179,7 @@ function ChannelContent(props: Props) {
|
|||
|
||||
{!fetching && (
|
||||
<ClaimListDiscover
|
||||
ignoreSearchInLanguage
|
||||
hasSource
|
||||
defaultFreshness={CS.FRESH_ALL}
|
||||
showHiddenByUser={viewHiddenChannels}
|
||||
|
@ -201,6 +202,7 @@ function ChannelContent(props: Props) {
|
|||
<Form onSubmit={() => {}} className="wunderbar--inline">
|
||||
<Icon icon={ICONS.SEARCH} />
|
||||
<FormField
|
||||
name="channel_search"
|
||||
className="wunderbar__input--inline"
|
||||
value={searchQuery}
|
||||
onChange={handleInputChange}
|
||||
|
|
|
@ -40,6 +40,7 @@ type Props = {
|
|||
showHiddenByUser?: boolean,
|
||||
showNoSourceClaims?: boolean,
|
||||
tileLayout: boolean,
|
||||
ignoreSearchInLanguage?: boolean,
|
||||
|
||||
orderBy?: Array<string>, // Trending, New, Top
|
||||
defaultOrderBy?: string,
|
||||
|
@ -155,6 +156,7 @@ function ClaimListDiscover(props: Props) {
|
|||
forceShowReposts = false,
|
||||
languageSetting,
|
||||
searchInLanguage,
|
||||
ignoreSearchInLanguage,
|
||||
limitClaimsPerChannel,
|
||||
releaseTime,
|
||||
scrollAnchor,
|
||||
|
@ -193,17 +195,18 @@ function ClaimListDiscover(props: Props) {
|
|||
);
|
||||
|
||||
const langParam = urlParams.get(CS.LANGUAGE_KEY) || null;
|
||||
const languageParams = searchInLanguage
|
||||
? langParam === null
|
||||
? languageSetting.concat(languageSetting === 'en' ? ',none' : '')
|
||||
const languageParams =
|
||||
searchInLanguage && !ignoreSearchInLanguage
|
||||
? langParam === null
|
||||
? languageSetting.concat(languageSetting === 'en' ? ',none' : '')
|
||||
: langParam === 'any'
|
||||
? null
|
||||
: langParam.concat(langParam === 'en' ? ',none' : '')
|
||||
: langParam === null
|
||||
? null
|
||||
: langParam === 'any'
|
||||
? null
|
||||
: langParam.concat(langParam === 'en' ? ',none' : '')
|
||||
: langParam === null
|
||||
? null
|
||||
: langParam === 'any'
|
||||
? null
|
||||
: langParam.concat(langParam === 'en' ? ',none' : '');
|
||||
: langParam.concat(langParam === 'en' ? ',none' : '');
|
||||
|
||||
let claimTypeParam = claimType || defaultClaimType || null;
|
||||
let streamTypeParam = streamType || defaultStreamType || null;
|
||||
|
|
Loading…
Reference in a new issue