mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-31 01:11:26 +00:00
41 lines
1.3 KiB
JavaScript
41 lines
1.3 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import * as settings from 'constants/settings';
|
|
import {
|
|
selectSubscriptionClaims,
|
|
selectSubscriptions,
|
|
selectSubscriptionsBeingFetched,
|
|
selectIsFetchingSubscriptions,
|
|
selectUnreadSubscriptions,
|
|
selectViewMode,
|
|
} from 'redux/selectors/subscriptions';
|
|
import {
|
|
doUpdateUnreadSubscriptions,
|
|
doFetchMySubscriptions,
|
|
doSetViewMode,
|
|
} 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 => ({
|
|
loading:
|
|
selectIsFetchingSubscriptions(state) ||
|
|
Boolean(Object.keys(selectSubscriptionsBeingFetched(state)).length),
|
|
subscribedChannels: selectSubscriptions(state),
|
|
autoDownload: makeSelectClientSetting(settings.AUTO_DOWNLOAD)(state),
|
|
allSubscriptions: selectSubscriptionClaims(state),
|
|
unreadSubscriptions: selectUnreadSubscriptions(state),
|
|
sortBy: selectFileListSubscriptionSort(state),
|
|
viewMode: selectViewMode(state),
|
|
});
|
|
|
|
export default connect(
|
|
select,
|
|
{
|
|
doUpdateUnreadSubscriptions,
|
|
doFetchMySubscriptions,
|
|
doSetClientSetting,
|
|
doSetViewMode,
|
|
}
|
|
)(SubscriptionsPage);
|