From 99ef947f9617074ae0449042fa355344b9eab2a4 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 11 Jun 2026 12:15:34 +0200 Subject: [PATCH] [Glitch] Fix "unlisted collections" profile section can be visible to other users Port 96e23af89258068d05cc8557df914b4a9add385b to glitch-soc Signed-off-by: Claire --- .../glitch/features/account_featured/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/javascript/flavours/glitch/features/account_featured/index.tsx b/app/javascript/flavours/glitch/features/account_featured/index.tsx index a79afc14f2..2d4a348d0d 100644 --- a/app/javascript/flavours/glitch/features/account_featured/index.tsx +++ b/app/javascript/flavours/glitch/features/account_featured/index.tsx @@ -41,6 +41,7 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({ const account = useAccount(accountId); const { suspended, blockedBy, hidden } = useAccountVisibility(accountId); const forceEmptyState = suspended || blockedBy || hidden; + const isOwnProfile = accountId === me; const dispatch = useAppDispatch(); @@ -69,10 +70,7 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({ const { listedCollections = [], unlistedCollections = [] } = Object.groupBy( collections, - (item) => - item.discoverable && !!item.item_count - ? 'listedCollections' - : 'unlistedCollections', + (item) => (item.discoverable ? 'listedCollections' : 'unlistedCollections'), ); const renderListItem = useCallback( @@ -166,7 +164,7 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({ defaultMessage='Collections' /> - {accountId === me && ( + {isOwnProfile && ( = ({