From 66dc8a4db6714cceaa38e17fcc2d3a0a794c5659 Mon Sep 17 00:00:00 2001 From: harshil Sharma Date: Mon, 30 Oct 2023 09:26:35 +0530 Subject: [PATCH] Set teammate display name --- app/screens/channel_info/channel_info.tsx | 1 + .../convert_gm_to_channel.tsx | 8 +++++- app/screens/convert_gm_to_channel/index.tsx | 3 +++ ios/Mattermost.xcodeproj/project.pbxproj | 26 ++++++++++++------- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/app/screens/channel_info/channel_info.tsx b/app/screens/channel_info/channel_info.tsx index 526c71fda..f88adae99 100644 --- a/app/screens/channel_info/channel_info.tsx +++ b/app/screens/channel_info/channel_info.tsx @@ -111,6 +111,7 @@ const ChannelInfo = ({ canManageSettings={canManageSettings} /> + {/* LOL hide this option for guest users */} {type === General.GM_CHANNEL && <> { +const ConvertGMToChannel = ({ + channelId, + currentUserId, + teammateNameDisplay, +}: Props) => { const [loadingAnimationTimeout, setLoadingAnimationTimeout] = useState(false); const [commonTeamsFetched, setCommonTeamsFetched] = useState(false); const [channelMembersFetched, setChannelMembersFetched] = useState(false); @@ -93,6 +98,7 @@ const ConvertGMToChannel = ({channelId, currentUserId}: Props) => { ); }; diff --git a/app/screens/convert_gm_to_channel/index.tsx b/app/screens/convert_gm_to_channel/index.tsx index 556fcf15b..dac0e3438 100644 --- a/app/screens/convert_gm_to_channel/index.tsx +++ b/app/screens/convert_gm_to_channel/index.tsx @@ -5,6 +5,7 @@ import {withDatabase} from '@nozbe/watermelondb/DatabaseProvider'; import withObservables from '@nozbe/with-observables'; import {observeCurrentUserId} from '@app/queries/servers/system'; +import {observeTeammateNameDisplay} from '@app/queries/servers/user'; import ConvertGMToChannel from './convert_gm_to_channel'; @@ -12,9 +13,11 @@ import type {WithDatabaseArgs} from '@typings/database/database'; const enhance = withObservables([], ({database}: WithDatabaseArgs) => { const currentUserId = observeCurrentUserId(database); + const teammateNameDisplay = observeTeammateNameDisplay(database); return { currentUserId, + teammateNameDisplay, }; }); diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index 568c6f899..e9608699b 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -1185,8 +1185,8 @@ ); mainGroup = 83CBB9F61A601CBA00E9B192; packageReferences = ( - 7FD4822A2864D73300A5B18B /* XCRemoteSwiftPackageReference "OpenGraph" */, - 27C667A129523ECA00E590D5 /* XCRemoteSwiftPackageReference "sentry-cocoa" */, + 7FD4822A2864D73300A5B18B /* XCRemoteSwiftPackageReference "OpenGraph.git" */, + 27C667A129523ECA00E590D5 /* XCRemoteSwiftPackageReference "sentry-cocoa.git" */, ); productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; @@ -2239,7 +2239,11 @@ "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + "-Wl -ld_classic ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; }; @@ -2290,7 +2294,11 @@ "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + "-Wl -ld_classic ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -2339,7 +2347,7 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 27C667A129523ECA00E590D5 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { + 27C667A129523ECA00E590D5 /* XCRemoteSwiftPackageReference "sentry-cocoa.git" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/getsentry/sentry-cocoa.git"; requirement = { @@ -2347,7 +2355,7 @@ kind = branch; }; }; - 7FD4822A2864D73300A5B18B /* XCRemoteSwiftPackageReference "OpenGraph" */ = { + 7FD4822A2864D73300A5B18B /* XCRemoteSwiftPackageReference "OpenGraph.git" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/satoshi-takano/OpenGraph.git"; requirement = { @@ -2360,12 +2368,12 @@ /* Begin XCSwiftPackageProductDependency section */ 27C667A229523ECA00E590D5 /* Sentry */ = { isa = XCSwiftPackageProductDependency; - package = 27C667A129523ECA00E590D5 /* XCRemoteSwiftPackageReference "sentry-cocoa" */; + package = 27C667A129523ECA00E590D5 /* XCRemoteSwiftPackageReference "sentry-cocoa.git" */; productName = Sentry; }; 27C667A429523F0A00E590D5 /* Sentry */ = { isa = XCSwiftPackageProductDependency; - package = 27C667A129523ECA00E590D5 /* XCRemoteSwiftPackageReference "sentry-cocoa" */; + package = 27C667A129523ECA00E590D5 /* XCRemoteSwiftPackageReference "sentry-cocoa.git" */; productName = Sentry; }; 49AE370026D4455D00EF4E52 /* Gekidou */ = { @@ -2382,7 +2390,7 @@ }; 7FD4822B2864D73300A5B18B /* OpenGraph */ = { isa = XCSwiftPackageProductDependency; - package = 7FD4822A2864D73300A5B18B /* XCRemoteSwiftPackageReference "OpenGraph" */; + package = 7FD4822A2864D73300A5B18B /* XCRemoteSwiftPackageReference "OpenGraph.git" */; productName = OpenGraph; }; /* End XCSwiftPackageProductDependency section */