diff --git a/app/screens/channel_info/channel_info.tsx b/app/screens/channel_info/channel_info.tsx index cf9e5f20f..fcab8d556 100644 --- a/app/screens/channel_info/channel_info.tsx +++ b/app/screens/channel_info/channel_info.tsx @@ -22,7 +22,6 @@ import Extra from './extra'; import Options from './options'; import Title from './title'; -import type {UserModel} from '@app/database/models/server'; import type {AvailableScreens} from '@typings/screens/navigation'; type Props = { @@ -34,7 +33,7 @@ type Props = { isCallsEnabledInChannel: boolean; canManageMembers: boolean; canManageSettings: boolean; - currentUser: UserModel; + isGuestUser: boolean; } const edges: Edge[] = ['bottom', 'left', 'right']; @@ -63,7 +62,7 @@ const ChannelInfo = ({ isCallsEnabledInChannel, canManageMembers, canManageSettings, - currentUser, + isGuestUser, }: Props) => { const theme = useTheme(); const serverUrl = useServerUrl(); @@ -80,7 +79,7 @@ const ChannelInfo = ({ useNavButtonPressed(closeButtonId, componentId, onPressed, [onPressed]); useAndroidHardwareBackHandler(componentId, onPressed); - const convertGMOptionAvailable = type === General.GM_CHANNEL && !currentUser.isGuest; + const convertGMOptionAvailable = type === General.GM_CHANNEL && !isGuestUser; return ( { distinctUntilChanged(), ); + const isGuestUser = currentUser.pipe( + switchMap((u) => (u ? of$(u.isGuest) : of$(false))), + distinctUntilChanged(), + ); + return { type, canEnableDisableCalls, isCallsEnabledInChannel, canManageMembers, canManageSettings, - currentUser, + isGuestUser, }; }); diff --git a/ios/Podfile.lock b/ios/Podfile.lock index c3f6f0a8b..0157d7ea5 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -570,9 +570,9 @@ PODS: - React-Core - RNVectorIcons (10.0.0): - React-Core - - SDWebImage (5.18.3): - - SDWebImage/Core (= 5.18.3) - - SDWebImage/Core (5.18.3) + - SDWebImage (5.18.2): + - SDWebImage/Core (= 5.18.2) + - SDWebImage/Core (5.18.2) - SDWebImageWebPCoder (0.13.0): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.17) @@ -986,7 +986,7 @@ SPEC CHECKSUMS: RNShare: da6d90b6dc332f51f86498041d6e34211f96b630 RNSVG: 03e4d258ca355d7836a0a5dd4d4dc63c1eb49cbb RNVectorIcons: 8b5bb0fa61d54cd2020af4f24a51841ce365c7e9 - SDWebImage: 96e0c18ef14010b7485210e92fac888587ebb958 + SDWebImage: c0de394d7cf7f9838aed1fd6bb6037654a4572e4 SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102 Sentry: 56c76eed917f7dffd46db50906afbf5c9aa2673a SentryPrivate: f3be34b5deb9fe676fdfb1f1ad5cdb1b740c5688 @@ -1001,4 +1001,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 25f07cb9e5eed8c84db8e8723000e8470c349058 -COCOAPODS: 1.14.2 +COCOAPODS: 1.14.2 \ No newline at end of file diff --git a/package.json b/package.json index 83833fd3c..7a951858b 100644 --- a/package.json +++ b/package.json @@ -204,7 +204,7 @@ "pod-install-m1": "react-native setup-ios-permissions && cd ios && arch -x86_64 pod install", "postinstall": "patch-package && ./scripts/postinstall.sh", "prepare": "husky install", - "preinstall": "./scripts/preinstall.sh", + "preinstall": "./scripts/preinstall.sh && npx solidarity", "start": "react-native start", "test": "jest --forceExit --runInBand", "test:coverage": "jest --coverage",