From 289c66f1c04fd651666dbbf2bcd649c517cce475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Sun, 15 Mar 2026 21:59:54 +0100 Subject: [PATCH] nicolium: fix timeline display conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- .../navigation/dropdown-navigation.tsx | 57 +++++++++-------- .../navigation/sidebar-navigation.tsx | 63 +++++++++++-------- 2 files changed, 67 insertions(+), 53 deletions(-) diff --git a/packages/nicolium/src/components/navigation/dropdown-navigation.tsx b/packages/nicolium/src/components/navigation/dropdown-navigation.tsx index f2f3a0f93..296187655 100644 --- a/packages/nicolium/src/components/navigation/dropdown-navigation.tsx +++ b/packages/nicolium/src/components/navigation/dropdown-navigation.tsx @@ -157,7 +157,7 @@ const DropdownNavigation: React.FC = React.memo((): React.JSX.Element | null => const { isOpen } = useRegistrationStatus(); const instance = useInstance(); - const restrictUnauth = instance.pleroma.metadata.restrict_unauthenticated; + const timelineAccess = instance.configuration.timelines_access; const containerRef = React.useRef(null); @@ -388,20 +388,22 @@ const DropdownNavigation: React.FC = React.memo((): React.JSX.Element | null => <> - - ) : ( - - ) - } - onClick={closeSidebar} - /> + {timelineAccess.live_feeds.local !== 'disabled' && ( + + ) : ( + + ) + } + onClick={closeSidebar} + /> + )} - {features.bubbleTimeline && ( + {features.bubbleTimeline && timelineAccess.live_feeds.bubble !== 'disabled' && ( /> )} - {features.federating && ( + {features.federating && timelineAccess.live_feeds.remote !== 'disabled' && ( /> )} - {features.wrenchedTimeline && ( - } - onClick={closeSidebar} - /> - )} + {features.wrenchedTimeline && + timelineAccess.live_feeds.wrenched !== 'disabled' && ( + } + onClick={closeSidebar} + /> + )} )} @@ -519,7 +522,7 @@ const DropdownNavigation: React.FC = React.memo((): React.JSX.Element | null => ) : (
- {features.publicTimeline && !restrictUnauth.timelines.local && ( + {features.publicTimeline && timelineAccess.live_feeds.local === 'public' && ( <> onClick={closeSidebar} /> - {features.bubbleTimeline && !restrictUnauth.timelines.bubble && ( + {features.bubbleTimeline && timelineAccess.live_feeds.bubble === 'public' && ( /> )} - {features.federating && !restrictUnauth.timelines.federated && ( + {features.federating && timelineAccess.live_feeds.remote === 'public' && ( /> )} - {features.wrenchedTimeline && !restrictUnauth.timelines.wrenched && ( + {features.wrenchedTimeline && timelineAccess.live_feeds.wrenched === 'public' && ( = React.memo(({ shrink }) ); const { data: draftCount = 0 } = useDraftStatusesCountQuery(); - const restrictUnauth = instance.pleroma.metadata.restrict_unauthenticated; + const timelineAccess = instance.configuration.timelines_access; const menu = useMemo((): Menu => { const menu: Menu = []; @@ -371,16 +371,21 @@ const SidebarNavigation: React.FC = React.memo(({ shrink }) {features.publicTimeline && ( <> - {features.wrenchedTimeline && (account ?? !restrictUnauth.timelines.wrenched) && ( - } - /> - )} + {features.wrenchedTimeline && + (account + ? timelineAccess.live_feeds.wrenched !== 'disabled' + : timelineAccess.live_feeds.wrenched === 'public') && ( + } + /> + )} - {(account ?? !restrictUnauth.timelines.local) && ( + {(account + ? timelineAccess.live_feeds.local !== 'disabled' + : timelineAccess.live_feeds.local === 'public') && ( = React.memo(({ shrink }) /> )} - {features.bubbleTimeline && (account ?? !restrictUnauth.timelines.bubble) && ( - } - /> - )} + {features.bubbleTimeline && + (account + ? timelineAccess.live_feeds.bubble !== 'disabled' + : timelineAccess.live_feeds.bubble === 'public') && ( + } + /> + )} - {features.federating && (account ?? !restrictUnauth.timelines.federated) && ( - } - /> - )} + {features.federating && + (account + ? timelineAccess.live_feeds.remote !== 'disabled' + : timelineAccess.live_feeds.remote === 'public') && ( + } + /> + )} )}