Fix ignored 'Content Type' filter (#694)
## Issue After enabling Advanced Filter in Category Pages, the 'Content Type' filter only works for "repost/video/list". ## Root-cause When `streamType` is not provided, it defaults to 'Video|Audio', making it always "defined": ``` streamType = SIMPLE_SITE ? [CS.FILE_VIDEO, CS.FILE_AUDIO] : undefined, ``` This seem to override the purpose of `defaultStreamType`, which will not be used unless the client explicitly set `streamType=null`, which currently is only being applied for `RECENT_FROM_FOLLOWING[]`. ``` const streamTypeParam = streamType || (CS.FILE_TYPES.includes(contentTypeParam) && contentTypeParam) || defaultStreamType || null; ```
This commit is contained in:
parent
7affa8b7a1
commit
0d6cd21457
1 changed files with 2 additions and 2 deletions
|
@ -133,8 +133,8 @@ function ClaimListDiscover(props: Props) {
|
|||
claimType,
|
||||
pageSize,
|
||||
defaultClaimType,
|
||||
streamType = SIMPLE_SITE ? [CS.FILE_VIDEO, CS.FILE_AUDIO] : undefined,
|
||||
defaultStreamType = SIMPLE_SITE ? CS.FILE_VIDEO : undefined, // add param for DEFAULT_STREAM_TYPE
|
||||
streamType,
|
||||
defaultStreamType = SIMPLE_SITE ? [CS.FILE_VIDEO, CS.FILE_AUDIO] : undefined, // add param for DEFAULT_STREAM_TYPE
|
||||
freshness,
|
||||
defaultFreshness = CS.FRESH_WEEK,
|
||||
renderProperties,
|
||||
|
|
Loading…
Reference in a new issue