fix: remove duplicate private chat info card
- stop rendering the extra private info card inside chat history - keep private chat identity details in the top bar and info sheet only
This commit is contained in:
@@ -659,7 +659,6 @@ private fun ChatScreen(
|
||||
state.isCounterpartRelationshipResolved &&
|
||||
!state.isCounterpartContact &&
|
||||
!state.isCounterpartBlocked
|
||||
val showPrivateInfoCard = isPrivateChat && state.counterpartUserId != null && !isTabletLayout
|
||||
val canShowMembersTab = state.chatType.equals("group", ignoreCase = true) ||
|
||||
(state.chatType.equals("channel", ignoreCase = true) && state.canManageMembers)
|
||||
val timelineItems = remember(state.messages, context) { buildChatTimelineItems(state.messages, context) }
|
||||
@@ -1212,26 +1211,6 @@ private fun ChatScreen(
|
||||
}
|
||||
}
|
||||
}
|
||||
AnimatedVisibility(
|
||||
visible = showPrivateInfoCard,
|
||||
enter = fadeIn(animationSpec = tween(180)) + slideInVertically(
|
||||
initialOffsetY = { -it / 4 },
|
||||
animationSpec = tween(180),
|
||||
),
|
||||
exit = fadeOut(animationSpec = tween(120)) + slideOutVertically(
|
||||
targetOffsetY = { -it / 4 },
|
||||
animationSpec = tween(120),
|
||||
),
|
||||
) {
|
||||
PrivateChatInfoCard(
|
||||
title = state.counterpartName?.takeIf { it.isNotBlank() } ?: state.chatTitle,
|
||||
username = state.counterpartUsername,
|
||||
avatarUrl = state.chatAvatarUrl,
|
||||
statusText = state.baseChatSubtitle.takeIf { it.isNotBlank() },
|
||||
isContact = state.isCounterpartContact,
|
||||
isBlocked = state.isCounterpartBlocked,
|
||||
)
|
||||
}
|
||||
val strip = topAudioStrip
|
||||
if (strip != null) {
|
||||
Row(
|
||||
|
||||
Reference in New Issue
Block a user