diff --git a/CHANGELOG.md b/CHANGELOG.md index 35500cde0..4f0a7a621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Show downloads newest first ([#7684](https://github.com/lbryio/lbry-desktop/pull/7684)) - Only allow images in image uploader ([#7672](https://github.com/lbryio/lbry-desktop/pull/7672)) - Fixed bug with csv exports ([#7697](https://github.com/lbryio/lbry-desktop/pull/7697)) - - Fixed small screen viewer position ([#7677](https://github.com/lbryio/lbry-desktop/pull/7677)) - Fixed various upload bugs including transcoding ([#7688](https://github.com/lbryio/lbry-desktop/pull/7688)) - Fallback for files with no extension ([#7704](https://github.com/lbryio/lbry-desktop/pull/7704)) diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index 8512fa3b1..a29f039f9 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -28,6 +28,7 @@ import type { ElementRef } from 'react'; import UriIndicator from 'component/uriIndicator'; import usePersistedState from 'effects/use-persisted-state'; import WalletTipAmountSelector from 'component/walletTipAmountSelector'; + import { getStripeEnvironment } from 'util/stripe'; const stripeEnvironment = getStripeEnvironment(); diff --git a/ui/component/commentsList/index.js b/ui/component/commentsList/index.js index 910ced4e3..f8755219d 100644 --- a/ui/component/commentsList/index.js +++ b/ui/component/commentsList/index.js @@ -23,9 +23,6 @@ import { doCommentReset, doCommentList, doCommentById, doCommentReactList } from import { selectActiveChannelClaim } from 'redux/selectors/app'; import { getChannelIdFromClaim } from 'util/claim'; import CommentsList from './view'; -import { makeSelectClientSetting } from 'redux/selectors/settings'; -import * as SETTINGS from 'constants/settings'; -import { doSetClientSetting } from 'redux/actions/settings'; const select = (state, props) => { const { uri } = props; @@ -59,19 +56,15 @@ const select = (state, props) => { myReactsByCommentId: selectMyReacts(state), othersReactsById: selectOthersReacts(state), activeChannelId: activeChannelClaim && activeChannelClaim.claim_id, - customCommentServers: makeSelectClientSetting(SETTINGS.CUSTOM_COMMENTS_SERVERS)(state), - commentServer: makeSelectClientSetting(SETTINGS.CUSTOM_COMMENTS_SERVER_URL)(state), }; }; -const perform = (dispatch, ownProps) => ({ - fetchTopLevelComments: (uri, parentId, page, pageSize, sortBy) => - dispatch(doCommentList(uri, parentId, page, pageSize, sortBy)), - fetchComment: (commentId) => dispatch(doCommentById(commentId)), - fetchReacts: (commentIds) => dispatch(doCommentReactList(commentIds)), - resetComments: (claimId) => dispatch(doCommentReset(claimId)), - doResolveUris: (uris, returnCachedClaims) => dispatch(doResolveUris(uris, returnCachedClaims)), - setCommentServer: (url) => dispatch(doSetClientSetting(SETTINGS.CUSTOM_COMMENTS_SERVER_URL, url, true)), -}); +const perform = { + fetchTopLevelComments: doCommentList, + fetchComment: doCommentById, + fetchReacts: doCommentReactList, + resetComments: doCommentReset, + doResolveUris, +}; export default connect(select, perform)(CommentsList); diff --git a/ui/component/commentsList/view.jsx b/ui/component/commentsList/view.jsx index 8698c5b2f..6f9a6eed8 100644 --- a/ui/component/commentsList/view.jsx +++ b/ui/component/commentsList/view.jsx @@ -1,6 +1,6 @@ // @flow import { COMMENT_PAGE_SIZE_TOP_LEVEL, SORT_BY } from 'constants/comment'; -import { ENABLE_COMMENT_REACTIONS, COMMENT_SERVER_API, COMMENT_SERVER_NAME } from 'config'; +import { ENABLE_COMMENT_REACTIONS } from 'config'; import { useIsMobile, useIsMediumScreen } from 'effects/use-screensize'; import { getCommentsListTitle } from 'util/comments'; import * as ICONS from 'constants/icons'; @@ -15,8 +15,6 @@ import Empty from 'component/common/empty'; import React, { useEffect } from 'react'; import Spinner from 'component/spinner'; import usePersistedState from 'effects/use-persisted-state'; -import { FormField } from 'component/common/form'; -import Comments from 'comments'; const DEBOUNCE_SCROLL_HANDLER_MS = 200; @@ -54,9 +52,6 @@ type Props = { fetchReacts: (commentIds: Array) => Promise, resetComments: (claimId: string) => void, doResolveUris: (uris: Array, returnCachedClaims: boolean) => void, - customCommentServers: Array, - setCommentServer: (string) => void, - commentServer: string, }; export default function CommentList(props: Props) { @@ -85,17 +80,11 @@ export default function CommentList(props: Props) { fetchReacts, resetComments, doResolveUris, - customCommentServers, - setCommentServer, - commentServer, } = props; const isMobile = useIsMobile(); const isMediumScreen = useIsMediumScreen(); - const defaultServer = { name: COMMENT_SERVER_NAME, url: COMMENT_SERVER_API }; - const allServers = [defaultServer, ...(customCommentServers || [])]; - const spinnerRef = React.useRef(); const DEFAULT_SORT = ENABLE_COMMENT_REACTIONS ? SORT_BY.POPULARITY : SORT_BY.NEWEST; const [sort, setSort] = usePersistedState('comment-sort-by', DEFAULT_SORT); @@ -266,16 +255,7 @@ export default function CommentList(props: Props) { }, [alreadyResolved, doResolveUris, topLevelComments]); const commentProps = { isTopLevel: true, threadDepth: 3, uri, claimIsMine, linkedCommentId }; - const actionButtonsProps = { - totalComments, - sort, - changeSort, - setPage, - allServers, - commentServer, - defaultServer, - setCommentServer, - }; + const actionButtonsProps = { totalComments, sort, changeSort, setPage }; return ( void, setPage: (number) => void, - allServers: Array, - commentServer: string, - setCommentServer: (string) => void, - defaultServer: CommentServerDetails, }; const CommentActionButtons = (actionButtonsProps: ActionButtonsProps) => { - const { totalComments, sort, changeSort, setPage, allServers, commentServer, setCommentServer, defaultServer } = - actionButtonsProps; + const { totalComments, sort, changeSort, setPage } = actionButtonsProps; + const sortButtonProps = { activeSort: sort, changeSort }; return ( @@ -379,35 +355,8 @@ const CommentActionButtons = (actionButtonsProps: ActionButtonsProps) => { )} -
-
- {allServers.length >= 2 && ( -
- - {allServers.map(function (server) { - return ( - - ); - })} - -
- )} + +