lbry-desktop/ui/js/page/fileListDownloaded/index.js
Alex Liebowitz c5c67a0de5 Minor refactors in doResolveUri()
Add doResolveUris()

Always call resolveUri() in FileTile and FileCard

Before, these components would only try and resolve if claim info
wasn't provided.

Don't require uri param in lbry.resolve()

It can now be "uris" instead, plus the error message about caching
doesn't really apply anymore.

Don't cache/cancel open resolve requests

No longer needed because we're not doing resolve requests in bulk

Add support for multiple URI resolution in lbry.resolve()

Handle multi URL resolves with one action

Update CHANGELOG.md
2017-10-10 09:03:17 -04:00

30 lines
1 KiB
JavaScript

import React from "react";
import { connect } from "react-redux";
import { doFetchFileInfosAndPublishedClaims } from "actions/file_info";
import {
selectFileInfosDownloaded,
selectIsFetchingFileListDownloadedOrPublished,
} from "selectors/file_info";
import {
selectMyClaimsWithoutChannels,
selectIsFetchingClaimListMine,
} from "selectors/claims";
import { doFetchClaimListMine } from "actions/content";
import { doNavigate } from "actions/navigation";
import FileListDownloaded from "./view";
const select = state => ({
fileInfos: selectFileInfosDownloaded(state),
isFetching: selectIsFetchingFileListDownloadedOrPublished(state),
claims: selectMyClaimsWithoutChannels(state),
isFetchingClaims: selectIsFetchingClaimListMine(state),
});
const perform = dispatch => ({
navigate: path => dispatch(doNavigate(path)),
fetchFileInfosDownloaded: () =>
dispatch(doFetchFileInfosAndPublishedClaims()),
fetchClaims: () => dispatch(doFetchClaimListMine()),
});
export default connect(select, perform)(FileListDownloaded);