@@ -138,22 +164,7 @@ const SidebarNavigation = () => {
>
)}
- {account && (
- features.chats ? (
-
}
- />
- ) : (
-
}
- />
- )
- )}
+ {account && renderMessagesLink()}
{menu.length > 0 && (
diff --git a/app/soapbox/components/thumb_navigation.tsx b/app/soapbox/components/thumb_navigation.tsx
index 21de09300..c1ac80fae 100644
--- a/app/soapbox/components/thumb_navigation.tsx
+++ b/app/soapbox/components/thumb_navigation.tsx
@@ -12,6 +12,34 @@ const ThumbNavigation: React.FC = (): JSX.Element => {
const dashboardCount = useAppSelector((state) => state.admin.openReports.count() + state.admin.awaitingApproval.count());
const features = getFeatures(useAppSelector((state) => state.instance));
+ /** Conditionally render the supported messages link */
+ const renderMessagesLink = (): React.ReactNode => {
+ if (features.chats) {
+ return (
+ }
+ to='/chats'
+ exact
+ count={chatsCount}
+ />
+ );
+ }
+
+ if (features.directTimeline || features.conversations) {
+ return (
+ }
+ to='/messages'
+ paths={['/messages', '/conversations']}
+ />
+ );
+ }
+
+ return null;
+ };
+
return (
{
/>
)}
- {account && (
- features.chats ? (
- }
- to='/chats'
- exact
- count={chatsCount}
- />
- ) : (
- }
- to='/messages'
- paths={['/messages', '/conversations']}
- />
- )
- )}
+ {account && renderMessagesLink()}
{(account && account.staff) && (
-
-
-
- {intl.formatMessage(messages.title)}
- {intl.formatMessage(messages.body)}
-
-
-
+
+
+
+ }
+ />
);
-
- // return (
- //
- //
-
- //
-
- // }
- // />
- //
- // );
}
}
diff --git a/app/soapbox/features/ui/index.tsx b/app/soapbox/features/ui/index.tsx
index e144c9b01..3b9255ec0 100644
--- a/app/soapbox/features/ui/index.tsx
+++ b/app/soapbox/features/ui/index.tsx
@@ -187,8 +187,12 @@ const SwitchingColumnsArea: React.FC = ({ children }) => {
{features.federating && }
{features.federating && }
-
-
+ {features.conversations && }
+ {features.directTimeline ? (
+
+ ) : (
+
+ )}
{/* Gab groups */}
{/*