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') && ( + } + /> + )} )}