From e171c827035a28c612dfa0aa1faf7675d3837483 Mon Sep 17 00:00:00 2001 From: harshil Sharma Date: Thu, 2 Nov 2023 12:00:19 +0530 Subject: [PATCH] Disabled option for guest users --- app/screens/channel_info/channel_info.tsx | 5 ++++- app/screens/channel_info/index.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/screens/channel_info/channel_info.tsx b/app/screens/channel_info/channel_info.tsx index f88adae99..3f0da9304 100644 --- a/app/screens/channel_info/channel_info.tsx +++ b/app/screens/channel_info/channel_info.tsx @@ -23,6 +23,7 @@ import Options from './options'; import Title from './title'; import type {AvailableScreens} from '@typings/screens/navigation'; +import type { UserModel } from '@app/database/models/server'; type Props = { channelId: string; @@ -33,6 +34,7 @@ type Props = { isCallsEnabledInChannel: boolean; canManageMembers: boolean; canManageSettings: boolean; + currentUser: UserModel; } const edges: Edge[] = ['bottom', 'left', 'right']; @@ -61,6 +63,7 @@ const ChannelInfo = ({ isCallsEnabledInChannel, canManageMembers, canManageSettings, + currentUser, }: Props) => { const theme = useTheme(); const serverUrl = useServerUrl(); @@ -112,7 +115,7 @@ const ChannelInfo = ({ /> {/* LOL hide this option for guest users */} - {type === General.GM_CHANNEL && + {type === General.GM_CHANNEL && !currentUser.isGuest && <> { isCallsEnabledInChannel, canManageMembers, canManageSettings, + currentUser, }; });