Skip to content

Commit 3196ebe

Browse files
authored
fix: hide member count if self not in group (#5704)
1 parent 5f9128c commit 3196ebe

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

packages/frontend/src/components/dialogs/ViewGroup.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,11 @@ function ViewGroupInner(
445445
className='group-separator'
446446
>
447447
{!isBroadcast
448-
? tx('n_members', group.contactIds.length.toString(), {
449-
quantity: group.contactIds.length,
450-
})
448+
? group.selfInGroup
449+
? tx('n_members', group.contactIds.length.toString(), {
450+
quantity: group.contactIds.length,
451+
})
452+
: ''
451453
: tx('n_recipients', group.contactIds.length.toString(), {
452454
quantity: group.contactIds.length,
453455
})}

packages/frontend/src/components/screens/MainScreen/MainScreen.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,13 @@ function chatSubtitle(chat: Type.FullChat) {
340340
const tx = window.static_translate
341341
if (chat.id && chat.id > C.DC_CHAT_ID_LAST_SPECIAL) {
342342
if (chat.chatType === C.DC_CHAT_TYPE_GROUP) {
343-
return tx('n_members', [String(chat.contactIds.length)], {
344-
quantity: chat.contactIds.length,
345-
})
343+
if (chat.selfInGroup) {
344+
return tx('n_members', [String(chat.contactIds.length)], {
345+
quantity: chat.contactIds.length,
346+
})
347+
} else {
348+
return '…'
349+
}
346350
} else if (
347351
chat.chatType === C.DC_CHAT_TYPE_SINGLE &&
348352
chat.contacts[0]?.isBot

0 commit comments

Comments
 (0)