doFetchClaimListMine: add 4th param to filter out claim_type
This commit is contained in:
parent
f449d7916c
commit
e5b79a8400
1 changed files with 9 additions and 3 deletions
|
@ -140,18 +140,24 @@ export function doResolveUri(uri: string) {
|
|||
export function doFetchClaimListMine(
|
||||
page: number = 1,
|
||||
pageSize: number = 99999,
|
||||
resolve: boolean = true
|
||||
resolve: boolean = true,
|
||||
filterBy: Array<string> = []
|
||||
) {
|
||||
return (dispatch: Dispatch) => {
|
||||
dispatch({
|
||||
type: ACTIONS.FETCH_CLAIM_LIST_MINE_STARTED,
|
||||
});
|
||||
|
||||
let claimTypes = ['stream', 'repost'];
|
||||
if (filterBy && filterBy.length !== 0) {
|
||||
claimTypes = claimTypes.filter(t => filterBy.includes(t));
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
Lbry.claim_list({
|
||||
page: page,
|
||||
page_size: pageSize,
|
||||
claim_type: ['stream', 'repost'],
|
||||
claim_type: claimTypes,
|
||||
resolve,
|
||||
}).then((result: StreamListResponse) => {
|
||||
dispatch({
|
||||
|
|
Loading…
Reference in a new issue