From 6e59e5b1b35767bf8a38365bd680a4eb872e114e Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 11 Jun 2019 14:38:08 -0400 Subject: [PATCH] don't persist by default for FileList --- src/ui/component/fileList/view.jsx | 2 +- src/ui/page/fileListPublished/index.js | 4 ++-- src/ui/page/fileListPublished/view.jsx | 14 +++++--------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/ui/component/fileList/view.jsx b/src/ui/component/fileList/view.jsx index 2676396f9..6310f171a 100644 --- a/src/ui/component/fileList/view.jsx +++ b/src/ui/component/fileList/view.jsx @@ -24,7 +24,7 @@ type Props = { export default function FileList(props: Props) { const { uris, header, headerAltControls, injectedItem, loading, persistedStorageKey, noHeader, slim, empty } = props; - const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey || 'file-list-global-sort', SORT_NEW); + const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW); const sortedUris = uris && currentSort === SORT_OLD ? uris.reverse() : uris; const hasUris = uris && !!uris.length; diff --git a/src/ui/page/fileListPublished/index.js b/src/ui/page/fileListPublished/index.js index 4664d9932..a1bfceff6 100644 --- a/src/ui/page/fileListPublished/index.js +++ b/src/ui/page/fileListPublished/index.js @@ -1,10 +1,10 @@ import { connect } from 'react-redux'; -import { selectIsFetchingClaimListMine, selectMyClaimsWithoutChannels } from 'lbry-redux'; +import { selectIsFetchingClaimListMine, selectMyClaimUrisWithoutChannels } from 'lbry-redux'; import { doCheckPendingPublishes } from 'redux/actions/publish'; import FileListPublished from './view'; const select = state => ({ - claims: selectMyClaimsWithoutChannels(state), + uris: selectMyClaimUrisWithoutChannels(state), fetching: selectIsFetchingClaimListMine(state), }); diff --git a/src/ui/page/fileListPublished/view.jsx b/src/ui/page/fileListPublished/view.jsx index 0a3302f30..30ddc7f62 100644 --- a/src/ui/page/fileListPublished/view.jsx +++ b/src/ui/page/fileListPublished/view.jsx @@ -5,27 +5,23 @@ import FileList from 'component/fileList'; import Page from 'component/page'; type Props = { - claims: Array, + uris: Array, checkPendingPublishes: () => void, fetching: boolean, }; function FileListPublished(props: Props) { - const { checkPendingPublishes, fetching, claims } = props; + const { checkPendingPublishes, fetching, uris } = props; useEffect(() => { checkPendingPublishes(); }, [checkPendingPublishes]); return ( - - {claims && claims.length ? ( + + {uris && uris.length ? (
- `lbry://${info.name}#${info.claim_id}`)} - /> +
) : (