Skip to content

Commit

Permalink
Merge branch 'master' into improve-private-list-deleted-content
Browse files Browse the repository at this point in the history
  • Loading branch information
keikari authored Dec 18, 2023
2 parents afc65c1 + c2604e3 commit 2e892af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions ui/component/claimMenuList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ const select = (state, props) => {
};
const claim = selectClaimForUri(state, uri, false) || placeholderForDeletedClaim;
const collectionId = props.collectionId;
const repostedClaim = claim && claim.reposted_claim;
const repostedClaim = claim?.reposted_claim;
const isRepost = Boolean(claim?.reposted_claim || claim?.value?.claim_hash);
const contentClaim = repostedClaim || claim;
const contentSigningChannel = contentClaim && contentClaim.signing_channel;
const contentPermanentUri = contentClaim && contentClaim.permanent_url;
Expand All @@ -63,7 +64,7 @@ const select = (state, props) => {

return {
claim,
repostedClaim,
isRepost,
contentClaim,
contentSigningChannel,
contentChannelUri,
Expand Down
10 changes: 5 additions & 5 deletions ui/component/claimMenuList/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type SubscriptionArgs = {
type Props = {
uri: string,
claim: Claim,
repostedClaim: ?Claim,
isRepost: boolean,
contentClaim: ?Claim,
contentSigningChannel: ?Claim,
contentChannelUri: string,
Expand Down Expand Up @@ -79,7 +79,7 @@ function ClaimMenuList(props: Props) {
const {
uri,
claim,
repostedClaim,
isRepost,
contentClaim,
contentSigningChannel,
contentChannelUri,
Expand Down Expand Up @@ -133,7 +133,7 @@ function ClaimMenuList(props: Props) {
const isChannel = !incognitoClaim && !contentSigningChannel;
const { channelName } = parseURI(contentChannelUri);
const showDelete = claimIsMine || (fileInfo && (fileInfo.written_bytes > 0 || fileInfo.blobs_completed > 0));
const subscriptionLabel = repostedClaim
const subscriptionLabel = isRepost
? isSubscribed
? __('Unfollow @%channelName%', { channelName })
: __('Follow @%channelName%', { channelName })
Expand Down Expand Up @@ -215,7 +215,7 @@ function ClaimMenuList(props: Props) {
*/

function handleDelete() {
if (!repostedClaim && !isChannel) {
if (!isRepost && !isChannel) {
openModal(MODALS.CONFIRM_FILE_REMOVE, { uri, doGoBack: false });
} else {
openModal(MODALS.CONFIRM_CLAIM_REVOKE, { claim, cb: isChannel && (() => replace(`/$/${PAGES.CHANNELS}`)) });
Expand Down Expand Up @@ -573,7 +573,7 @@ function ClaimMenuList(props: Props) {
</div>
</MenuItem>
) */}
{!repostedClaim && (
{!isRepost && (
<MenuItem className="comment__menu-option" onSelect={handleEdit}>
<div className="menu__link">
<Icon aria-hidden icon={ICONS.EDIT} />
Expand Down

0 comments on commit 2e892af

Please sign in to comment.