diff --git a/app/package.json b/app/package.json index 37c2f2ab3..92b1ff311 100644 --- a/app/package.json +++ b/app/package.json @@ -20,7 +20,7 @@ "electron-rebuild": "^1.5.11" }, "lbrySettings": { - "lbrynetDaemonVersion": "0.17.0rc13", + "lbrynetDaemonVersion": "0.17.0rc16", "lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-daemon-vDAEMONVER-OSNAME.zip" }, "license": "MIT" diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index 912b06d11..be444a26a 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -45,11 +45,12 @@ export function doResolveUris(uris) { let resolveInfo = {}; lbry.resolve({ uris: urisToResolve }).then(result => { for (let [uri, uriResolveInfo] of Object.entries(result)) { - const { claim, certificate } = uriResolveInfo || { - claim: null, - certificate: null, + const { claim, certificate, claims_in_channel } = uriResolveInfo || { + claim: undefined, + claims_in_channel: undefined, + certificate: undefined, }; - resolveInfo[uri] = { claim, certificate }; + resolveInfo[uri] = { claim, certificate, claims_in_channel }; } dispatch({ diff --git a/ui/js/actions/search.js b/ui/js/actions/search.js index a83ce60bb..e26251e3e 100644 --- a/ui/js/actions/search.js +++ b/ui/js/actions/search.js @@ -5,11 +5,13 @@ import { doNavigate } from "actions/navigation"; import { selectCurrentPage } from "selectors/navigation"; import batchActions from "util/batchActions"; -export function doSearch(query) { +export function doSearch(rawQuery) { return function(dispatch, getState) { const state = getState(); const page = selectCurrentPage(state); + const query = rawQuery.replace(/^lbry:\/\//, ""); + if (!query) { return dispatch({ type: types.SEARCH_CANCELLED, diff --git a/ui/js/component/channelTile/index.js b/ui/js/component/channelTile/index.js index 2e4c438f7..6cc68149f 100644 --- a/ui/js/component/channelTile/index.js +++ b/ui/js/component/channelTile/index.js @@ -1,19 +1,21 @@ import React from "react"; import { connect } from "react-redux"; -import { doFetchClaimCountByChannel } from "actions/content"; import { makeSelectClaimForUri } from "selectors/claims"; import { doNavigate } from "actions/navigation"; +import { doResolveUri } from "actions/content"; import { makeSelectTotalItemsForChannel } from "selectors/content"; +import { makeSelectIsUriResolving } from "selectors/content"; import ChannelTile from "./view"; const select = (state, props) => ({ claim: makeSelectClaimForUri(props.uri)(state), + isResolvingUri: makeSelectIsUriResolving(props.uri)(state), totalItems: makeSelectTotalItemsForChannel(props.uri)(state), }); const perform = dispatch => ({ - fetchClaimCount: uri => dispatch(doFetchClaimCountByChannel(uri)), navigate: (path, params) => dispatch(doNavigate(path, params)), + resolveUri: uri => dispatch(doResolveUri(uri)), }); export default connect(select, perform)(ChannelTile); diff --git a/ui/js/component/channelTile/view.jsx b/ui/js/component/channelTile/view.jsx index 973d1dff5..6082ec58a 100644 --- a/ui/js/component/channelTile/view.jsx +++ b/ui/js/component/channelTile/view.jsx @@ -3,21 +3,21 @@ import { TruncatedText, BusyMessage } from "component/common.js"; class ChannelTile extends React.PureComponent { componentDidMount() { - const { uri, fetchClaimCount } = this.props; + const { uri, resolveUri } = this.props; - fetchClaimCount(uri); + resolveUri(uri); } componentWillReceiveProps(nextProps) { - const { uri, fetchClaimCount } = this.props; + const { uri, resolveUri } = this.props; if (nextProps.uri != uri) { - fetchClaimCount(uri); + resolveUri(uri); } } render() { - const { navigate, totalItems, uri } = this.props; + const { claim, navigate, isResolvingUri, totalItems, uri } = this.props; let onClick = () => navigate("/show", { uri }); @@ -31,13 +31,15 @@ class ChannelTile extends React.PureComponent {