Set teammate display name

This commit is contained in:
harshil Sharma 2023-10-30 09:26:35 +05:30
parent 7c008a9726
commit 66dc8a4db6
4 changed files with 28 additions and 10 deletions

View file

@ -111,6 +111,7 @@ const ChannelInfo = ({
canManageSettings={canManageSettings}
/>
<View style={styles.separator}/>
{/* LOL hide this option for guest users */}
{type === General.GM_CHANNEL &&
<>
<ConvertToChannelLabel

View file

@ -14,11 +14,16 @@ import { logDebug } from '@app/utils/log';
type Props = {
channelId: string;
currentUserId?: string;
teammateNameDisplay: string;
}
const loadingIndicatorTimeout = 1200;
const ConvertGMToChannel = ({channelId, currentUserId}: Props) => {
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) => {
<ConvertGMToChannelForm
commonTeams={commonTeams}
profiles={profiles}
teammateNameDisplay={teammateNameDisplay}
/>
);
};

View file

@ -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,
};
});

View file

@ -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 */