fix(app): show the full user tag beside display names instead of a bare discriminator (#1696)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-17 14:46:06 +02:00
1 parent 10ae4bfe1e
commit 3fa766c39c
24 files changed
+53 -58

No files matched your search

@@ -9,6 +9,7 @@ import {
} from '@app/features/i18n/utils/CommonMessageDescriptors';
import type {User} from '@app/features/user/models/User';
import Users from '@app/features/user/state/Users';
import * as NicknameUtils from '@app/features/user/utils/NicknameUtils';
import {ChannelTypes} from '@fluxer/constants/src/ChannelConstants';
import {useLingui} from '@lingui/react/macro';
import {useMemo} from 'react';
@@ -39,12 +40,7 @@ export const useChannelHeaderData = (channel?: Channel): ChannelHeaderData => {
}
return Users.getUser(channel.recipientIds[0]) ?? null;
}, [channel, isDM]);
const directMessageName = useMemo(() => {
if (!isDM || !recipient) {
return '';
}
return recipient.displayName;
}, [isDM, recipient]);
const directMessageName = isDM && recipient && channel ? NicknameUtils.getNickname(recipient, null, channel.id) : '';
const groupDMName = useMemo(() => {
if (!isGroupDM || !channel) {
return '';