diff --git a/package.json b/package.json index 3ff501c53..ef3c16491 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "imagesloaded": "^4.1.4", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#f449d7916cacb9e61f19afc84cecac6182cde6d6", + "lbry-redux": "lbryio/lbry-redux#d75e7725feb1584937c405ddfda91f0f30ee8749", "lbryinc": "lbryio/lbryinc#7faea40d87b78ec91b901c62f501499dc4737025", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/ui/page/fileListPublished/index.js b/ui/page/fileListPublished/index.js index bf09f976b..3154874a8 100644 --- a/ui/page/fileListPublished/index.js +++ b/ui/page/fileListPublished/index.js @@ -30,9 +30,10 @@ const select = (state, props) => { }; }; -const perform = dispatch => ({ +const perform = (dispatch) => ({ checkPendingPublishes: () => dispatch(doCheckPendingClaims()), - fetchClaimListMine: (page, pageSize) => dispatch(doFetchClaimListMine(page, pageSize)), + fetchClaimListMine: (page, pageSize, resolve, filterBy) => + dispatch(doFetchClaimListMine(page, pageSize, resolve, filterBy)), clearPublish: () => dispatch(doClearPublish()), }); diff --git a/ui/page/fileListPublished/view.jsx b/ui/page/fileListPublished/view.jsx index ca7b802c6..d5971f281 100644 --- a/ui/page/fileListPublished/view.jsx +++ b/ui/page/fileListPublished/view.jsx @@ -10,16 +10,21 @@ import { PAGE_PARAM, PAGE_SIZE_PARAM } from 'constants/claim'; import WebUploadList from 'component/webUploadList'; import Spinner from 'component/spinner'; import Yrbl from 'component/yrbl'; +import classnames from 'classnames'; + +const FILTER_ALL = 'stream,repost'; +const FILTER_UPLOADS = 'stream'; +const FILTER_REPOSTS = 'repost'; type Props = { uploadCount: number, checkPendingPublishes: () => void, clearPublish: () => void, - fetchClaimListMine: (number, number) => void, + fetchClaimListMine: (number, number, boolean, Array) => void, fetching: boolean, urls: Array, urlTotal: number, - history: { replace: string => void, push: string => void }, + history: { replace: (string) => void, push: (string) => void }, page: number, pageSize: number, }; @@ -37,6 +42,7 @@ function FileListPublished(props: Props) { pageSize, } = props; + const [filterBy, setFilterBy] = React.useState(FILTER_ALL); const params = {}; params[PAGE_PARAM] = Number(page); @@ -51,9 +57,9 @@ function FileListPublished(props: Props) { useEffect(() => { if (paramsString && fetchClaimListMine) { const params = JSON.parse(paramsString); - fetchClaimListMine(params.page, params.page_size); + fetchClaimListMine(params.page, params.page_size, true, filterBy.split(',')); } - }, [uploadCount, paramsString, fetchClaimListMine]); + }, [uploadCount, paramsString, filterBy, fetchClaimListMine]); return ( @@ -71,7 +77,7 @@ function FileListPublished(props: Props) { button="alt" label={__('Refresh')} icon={ICONS.REFRESH} - onClick={() => fetchClaimListMine(params.page, params.page_size)} + onClick={() => fetchClaimListMine(params.page, params.page_size, true, filterBy.split(','))} /> )}