Fix incorrect member count in chat details during pending membership
This commit is contained in:
parent
79035f5570
commit
ebecf2403f
3 changed files with 5 additions and 6 deletions
|
@ -391,7 +391,7 @@ export function ConversationDetails({
|
|||
i18n={i18n}
|
||||
isMe={conversation.isMe}
|
||||
isGroup={isGroup}
|
||||
memberships={memberships}
|
||||
membersCount={conversation.membersCount ?? null}
|
||||
startEditing={(isGroupTitle: boolean) => {
|
||||
setModalState(
|
||||
isGroupTitle
|
||||
|
|
|
@ -41,7 +41,7 @@ function Wrapper(overrideProps: Partial<Props>) {
|
|||
i18n={i18n}
|
||||
canEdit={false}
|
||||
startEditing={action('startEditing')}
|
||||
memberships={new Array(0)}
|
||||
membersCount={0}
|
||||
isGroup
|
||||
isMe={false}
|
||||
theme={theme}
|
||||
|
|
|
@ -9,7 +9,6 @@ import { AvatarLightbox } from '../../AvatarLightbox';
|
|||
import type { ConversationType } from '../../../state/ducks/conversations';
|
||||
import { GroupDescription } from '../GroupDescription';
|
||||
import { About } from '../About';
|
||||
import type { GroupV2Membership } from './ConversationDetailsMembershipList';
|
||||
import type { LocalizerType, ThemeType } from '../../../types/Util';
|
||||
import { assertDev } from '../../../util/assert';
|
||||
import { BadgeDialog } from '../../BadgeDialog';
|
||||
|
@ -26,7 +25,7 @@ export type Props = {
|
|||
i18n: LocalizerType;
|
||||
isGroup: boolean;
|
||||
isMe: boolean;
|
||||
memberships: ReadonlyArray<GroupV2Membership>;
|
||||
membersCount: number | null;
|
||||
startEditing: (isGroupTitle: boolean) => void;
|
||||
toggleAboutContactModal: (contactId: string) => void;
|
||||
theme: ThemeType;
|
||||
|
@ -45,7 +44,7 @@ export function ConversationDetailsHeader({
|
|||
i18n,
|
||||
isGroup,
|
||||
isMe,
|
||||
memberships,
|
||||
membersCount,
|
||||
startEditing,
|
||||
toggleAboutContactModal,
|
||||
theme,
|
||||
|
@ -71,7 +70,7 @@ export function ConversationDetailsHeader({
|
|||
subtitle = i18n('icu:ConversationDetailsHeader--add-group-description');
|
||||
} else {
|
||||
subtitle = i18n('icu:ConversationDetailsHeader--members', {
|
||||
number: memberships.length,
|
||||
number: membersCount ?? 0,
|
||||
});
|
||||
}
|
||||
} else if (!isMe) {
|
||||
|
|
Loading…
Reference in a new issue