diff --git a/package.json b/package.json index b370b41c1..bcab45c77 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "imagesloaded": "^4.1.4", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#aa2cfa789670e899824d3d3ac1ae677172a7ad4e", + "lbry-redux": "lbryio/lbry-redux#d2079111b3372eb926d2753991bed860e57a970a", "lbryinc": "lbryio/lbryinc#6a52f8026cdc7cd56d200fb5c46f852e0139bbeb", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/ui/component/commentsList/index.js b/ui/component/commentsList/index.js index 17107f8e0..6d5f3929b 100644 --- a/ui/component/commentsList/index.js +++ b/ui/component/commentsList/index.js @@ -1,11 +1,18 @@ import { connect } from 'react-redux'; -import { makeSelectCommentsForUri, doCommentList, makeSelectClaimIsMine, selectMyChannelClaims } from 'lbry-redux'; +import { + makeSelectCommentsForUri, + doCommentList, + makeSelectClaimIsMine, + selectMyChannelClaims, + selectIsFetchingComments, +} from 'lbry-redux'; import CommentsList from './view'; const select = (state, props) => ({ myChannels: selectMyChannelClaims(state), comments: makeSelectCommentsForUri(props.uri)(state), claimIsMine: makeSelectClaimIsMine(props.uri)(state), + isFetchingComments: selectIsFetchingComments(state), }); const perform = dispatch => ({ diff --git a/ui/component/commentsList/view.jsx b/ui/component/commentsList/view.jsx index cd257c7a0..bcffa8d82 100644 --- a/ui/component/commentsList/view.jsx +++ b/ui/component/commentsList/view.jsx @@ -1,6 +1,7 @@ // @flow import React, { useEffect } from 'react'; import Comment from 'component/comment'; +import Spinner from 'component/spinner'; type Props = { comments: Array, @@ -8,10 +9,11 @@ type Props = { uri: string, claimIsMine: boolean, myChannels: ?Array, + isFetchingComments: boolean, }; function CommentList(props: Props) { - const { fetchComments, uri, comments, claimIsMine, myChannels } = props; + const { fetchComments, uri, comments, claimIsMine, myChannels, isFetchingComments } = props; // todo: implement comment_list --mine in SDK so redux can grab with selectCommentIsMine const isMyComment = (channelId: string) => { @@ -49,7 +51,13 @@ function CommentList(props: Props) { return (