From 968661474e37b8aed9773fdd012c45eca652141d Mon Sep 17 00:00:00 2001 From: Jessop Breth Date: Fri, 26 Oct 2018 00:04:53 -0400 Subject: [PATCH] adds sortBy default prop --- package.json | 2 +- src/renderer/component/fileList/view.jsx | 5 +++-- src/renderer/page/subscriptions/index.js | 2 -- src/renderer/page/subscriptions/view.jsx | 13 +++---------- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 0dce4c7e0..fcb17211c 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "formik": "^0.10.4", "hast-util-sanitize": "^1.1.2", "keytar": "^4.2.1", - "lbry-redux": "lbryio/lbry-redux#03aea43da5f12bc01546a92bdf460ebd08681013", + "lbry-redux": "lbryio/lbry-redux#ecd1ab156fb755c8bff4d890679399d66f41ad17", "lbryinc": "lbryio/lbryinc#3f34af546ee73ff2ee7d8ad05e540b3b0aa658fb", "localforage": "^1.7.1", "mammoth": "^1.4.6", diff --git a/src/renderer/component/fileList/view.jsx b/src/renderer/component/fileList/view.jsx index b2b1eaa45..52867ff52 100644 --- a/src/renderer/component/fileList/view.jsx +++ b/src/renderer/component/fileList/view.jsx @@ -12,13 +12,14 @@ type Props = { fileInfos: Array, checkPending?: boolean, sortBy: string, - page: string, - setFileListSort: (string, string) => void, + page?: string, + setFileListSort: (?string, string) => void, }; class FileList extends React.PureComponent { static defaultProps = { hideFilter: false, + sortBy: SORT_OPTIONS.DATE_NEW, }; constructor(props: Props) { diff --git a/src/renderer/page/subscriptions/index.js b/src/renderer/page/subscriptions/index.js index 70fb57fc3..a62734e5d 100644 --- a/src/renderer/page/subscriptions/index.js +++ b/src/renderer/page/subscriptions/index.js @@ -15,7 +15,6 @@ import { } from 'redux/actions/subscriptions'; import { doSetClientSetting } from 'redux/actions/settings'; import { makeSelectClientSetting } from 'redux/selectors/settings'; -import { selectFileListSubscriptionSort } from 'lbry-redux'; import SubscriptionsPage from './view'; const select = state => ({ @@ -26,7 +25,6 @@ const select = state => ({ autoDownload: makeSelectClientSetting(settings.AUTO_DOWNLOAD)(state), allSubscriptions: selectSubscriptionClaims(state), unreadSubscriptions: selectUnreadSubscriptions(state), - sortBy: selectFileListSubscriptionSort(state), viewMode: selectViewMode(state), }); diff --git a/src/renderer/page/subscriptions/view.jsx b/src/renderer/page/subscriptions/view.jsx index fa039d318..5b7b80578 100644 --- a/src/renderer/page/subscriptions/view.jsx +++ b/src/renderer/page/subscriptions/view.jsx @@ -10,7 +10,7 @@ import FileList from 'component/fileList'; import HiddenNsfwClaims from 'component/hiddenNsfwClaims'; import { FormField } from 'component/common/form'; import FileCard from 'component/fileCard'; -import { parseURI, PAGES } from 'lbry-redux'; +import { parseURI } from 'lbry-redux'; type Props = { subscribedChannels: Array, // The channels a user is subscribed to @@ -25,7 +25,6 @@ type Props = { doSetViewMode: ViewMode => void, doFetchMySubscriptions: () => void, doSetClientSetting: (string, boolean) => void, - sortBy: string, }; export default class extends React.PureComponent { @@ -45,19 +44,13 @@ export default class extends React.PureComponent { } renderSubscriptions() { - const { viewMode, unreadSubscriptions, allSubscriptions, sortBy } = this.props; + const { viewMode, unreadSubscriptions, allSubscriptions } = this.props; if (viewMode === VIEW_ALL) { return (
{__('Your subscriptions')}
- +
); }