diff --git a/src/components/ListCard.tsx b/src/components/ListCard.tsx index 0c922b63af..829f36d471 100644 --- a/src/components/ListCard.tsx +++ b/src/components/ListCard.tsx @@ -117,7 +117,10 @@ export function TitleAndByline({ + isContentVisibleInitialState={ + creator && currentAccount?.did === creator.did + } + allowOverride={creator && currentAccount?.did === creator.did}> void meta: { - isNoPwi?: boolean - noOverride?: boolean + isNoPwi: boolean + allowOverride: boolean } } @@ -27,16 +27,18 @@ export const useHider = () => React.useContext(Context) export function Outer({ modui, - override, + isContentVisibleInitialState, + allowOverride, children, }: React.PropsWithChildren<{ - override?: boolean + isContentVisibleInitialState?: boolean + allowOverride?: boolean modui: ModerationUI | undefined }>) { const control = useModerationDetailsDialogControl() const blur = modui?.blurs[0] const [isContentVisible, setIsContentVisible] = React.useState( - override || !blur, + isContentVisibleInitialState || !blur, ) const info = useModerationCauseDescription(blur) @@ -48,7 +50,7 @@ export function Outer({ cause.labelDef.identifier === '!no-unauthenticated', ), ), - noOverride: modui?.noOverride, + allowOverride: allowOverride || !modui?.noOverride, } const showInfoDialog = () => { @@ -56,7 +58,7 @@ export function Outer({ } const onSetContentVisible = (show: boolean) => { - if (meta.noOverride) return + if (meta.allowOverride) return setIsContentVisible(show) } diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index 727ab4b6dd..304bb839e2 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -142,6 +142,7 @@ function ProfileListScreenLoaded({ const queryClient = useQueryClient() const {openComposer} = useComposerControls() const setMinimalShellMode = useSetMinimalShellMode() + const {currentAccount} = useSession() const {rkey} = route.params const feedSectionRef = React.useRef(null) const aboutSectionRef = React.useRef(null) @@ -149,6 +150,7 @@ function ProfileListScreenLoaded({ const isCurateList = list.purpose === 'app.bsky.graph.defs#curatelist' const isScreenFocused = useIsFocused() const isHidden = list.labels?.findIndex(l => l.val === '!hide') !== -1 + const isOwner = currentAccount?.did === list.creator.did const moderation = React.useMemo(() => { return moderateUserList(list, moderationOpts) @@ -191,7 +193,7 @@ function ProfileListScreenLoaded({ if (isCurateList) { return ( - + @@ -241,7 +243,7 @@ function ProfileListScreenLoaded({ ) } return ( - +