diff --git a/static/app-strings.json b/static/app-strings.json index 79f13cc1d..b3ca767d7 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -378,8 +378,6 @@ "Unfollow": "Unfollow", "Follow @%channelName%": "Follow @%channelName%", "Unfollow @%channelName%": "Unfollow @%channelName%", - "Item removed from %name%": "Item removed from %name%", - "Item added to %name%": "Item added to %name%", "These LBRY Credits remain yours. It is a deposit to reserve the name and can be undone at any time.": "These LBRY Credits remain yours. It is a deposit to reserve the name and can be undone at any time.", "Create channel": "Create channel", "Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.": "Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.", @@ -2030,10 +2028,12 @@ "Remove from Watch Later": "Remove from Watch Later", "Add to Watch Later": "Add to Watch Later", "Added": "Added", + "Item removed from %name%": "Item removed from %name%", + "Item added to %name%": "Item added to %name%", "Item added to Watch Later": "Item added to Watch Later", "Item removed from Watch Later": "Item removed from Watch Later", - "Item added to %lastCollectionName%": "Item added to %lastCollectionName%", - "Item removed from %lastCollectionName%": "Item removed from %lastCollectionName%", + "Item added to Favorites": "Item added to Favorites", + "Item removed from Favorites": "Item removed from Favorites", "Your publish is being confirmed and will be live soon": "Your publish is being confirmed and will be live soon", "Clear Edits": "Clear Edits", "Something not quite right..": "Something not quite right..", diff --git a/ui/component/claimMenuList/index.js b/ui/component/claimMenuList/index.js index bf0a0e514..ddf7ebdf7 100644 --- a/ui/component/claimMenuList/index.js +++ b/ui/component/claimMenuList/index.js @@ -46,8 +46,14 @@ const select = (state, props) => { contentSigningChannel, contentChannelUri, claimIsMine: makeSelectSigningIsMine(props.uri)(state), - hasClaimInWatchLater: makeSelectCollectionForIdHasClaimUrl(COLLECTIONS_CONSTS.WATCH_LATER_ID, contentPermanentUri)(state), - hasClaimInCustom: makeSelectCollectionForIdHasClaimUrl(COLLECTIONS_CONSTS.FAVORITES_ID, contentPermanentUri)(state), + hasClaimInWatchLater: makeSelectCollectionForIdHasClaimUrl( + COLLECTIONS_CONSTS.WATCH_LATER_ID, + contentPermanentUri + )(state), + hasClaimInFavorites: makeSelectCollectionForIdHasClaimUrl( + COLLECTIONS_CONSTS.FAVORITES_ID, + contentPermanentUri + )(state), channelIsMuted: makeSelectChannelIsMuted(contentChannelUri)(state), channelIsBlocked: makeSelectChannelIsBlocked(contentChannelUri)(state), fileInfo: makeSelectFileInfoForUri(contentPermanentUri)(state), @@ -78,8 +84,7 @@ const perform = (dispatch) => ({ doChannelUnmute: (channelUri) => dispatch(doChannelUnmute(channelUri)), doCommentModBlock: (channelUri) => dispatch(doCommentModBlock(channelUri)), doCommentModUnBlock: (channelUri) => dispatch(doCommentModUnBlock(channelUri)), - doCommentModBlockAsAdmin: (commenterUri, blockerId) => - dispatch(doCommentModBlockAsAdmin(commenterUri, blockerId)), + doCommentModBlockAsAdmin: (commenterUri, blockerId) => dispatch(doCommentModBlockAsAdmin(commenterUri, blockerId)), doCommentModUnBlockAsAdmin: (commenterUri, blockerId) => dispatch(doCommentModUnBlockAsAdmin(commenterUri, blockerId)), doChannelSubscribe: (subscription) => dispatch(doChannelSubscribe(subscription)), diff --git a/ui/component/claimMenuList/view.jsx b/ui/component/claimMenuList/view.jsx index 0b939360d..4ab197178 100644 --- a/ui/component/claimMenuList/view.jsx +++ b/ui/component/claimMenuList/view.jsx @@ -12,7 +12,7 @@ import { useHistory } from 'react-router'; import { buildURI, parseURI, COLLECTIONS_CONSTS } from 'lbry-redux'; const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL; -const PAGE_VIEW_QUERY = `view`; +const PAGE_VIEW_QUERY = 'view'; const EDIT_PAGE = 'edit'; type SubscriptionArgs = { @@ -42,7 +42,7 @@ type Props = { doCommentModUnBlockAsAdmin: (string, string) => void, doCollectionEdit: (string, any) => void, hasClaimInWatchLater: boolean, - hasClaimInCustom: boolean, + hasClaimInFavorites: boolean, claimInCollection: boolean, collectionId: string, isMyCollection: boolean, @@ -80,7 +80,7 @@ function ClaimMenuList(props: Props) { doCommentModUnBlockAsAdmin, doCollectionEdit, hasClaimInWatchLater, - hasClaimInCustom, + hasClaimInFavorites, collectionId, isMyCollection, doToast, @@ -105,8 +105,6 @@ function ClaimMenuList(props: Props) { : isSubscribed ? __('Unfollow') : __('Follow'); - const lastCollectionName = 'Favorites'; - const lastCollectionId = COLLECTIONS_CONSTS.FAVORITES_ID; const { push, replace } = useHistory(); if (!claim) { @@ -282,21 +280,23 @@ function ClaimMenuList(props: Props) { {/* WATCH LATER */} handleAdd(hasClaimInWatchLater, 'Watch Later', COLLECTIONS_CONSTS.WATCH_LATER_ID)} + onSelect={() => + handleAdd(hasClaimInWatchLater, __('Watch Later'), COLLECTIONS_CONSTS.WATCH_LATER_ID) + } >
{hasClaimInWatchLater ? __('In Watch Later') : __('Watch Later')}
- {/* CUSTOM LIST */} + {/* FAVORITES LIST */} handleAdd(hasClaimInCustom, lastCollectionName, lastCollectionId)} + onSelect={() => handleAdd(hasClaimInFavorites, __('Favorites'), COLLECTIONS_CONSTS.FAVORITES_ID)} >
- - {hasClaimInCustom ? __(`In ${lastCollectionName}`) : __(`${lastCollectionName}`)} + + {hasClaimInFavorites ? __('In Favorites') : __('Favorites')}
{/* CURRENTLY ONLY SUPPORT PLAYLISTS FOR PLAYABLE; LATER DIFFERENT TYPES */}