Skip to content

Commit

Permalink
fix: show connection request with unavailable name [WPB-6247] (#2718)
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Żerko <iot.zerko@gmail.com>
Co-authored-by: Yamil Medina <yamilmedina@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 23, 2024
1 parent 216ee5b commit f51420a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ private fun ConversationDetails.toConversationItem(
),
conversationInfo = ConversationInfo(
name = otherUser?.name.orEmpty(),
membership = userTypeMapper.toMembership(userType)
membership = userTypeMapper.toMembership(userType),
isSenderUnavailable = otherUser?.isUnavailableUser ?: true
),
lastMessageContent = UILastMessageContent.Connection(
connection.status,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,25 @@ fun PreviewConnectionConversationItemWithSentConnectRequestBadge() {
)
}

@Preview
@Composable
fun PreviewConnectionConversationItemWithSentConnectRequestBadgeWithUnknownSender() {
ConversationItemFactory(
conversation = ConversationItem.ConnectionConversation(
userAvatarData = UserAvatarData(),
conversationId = QualifiedID("value", "domain"),
mutedStatus = MutedConversationStatus.OnlyMentionsAndRepliesAllowed,
lastMessageContent = null,
badgeEventType = BadgeEventType.SentConnectRequest,
conversationInfo = ConversationInfo("", isSenderUnavailable = true)
),
searchQuery = "",
isSelectableItem = false,
isChecked = false,
{}, {}, {}, {}, {}, {}
)
}

@Preview
@Composable
fun PreviewPrivateConversationItemWithBlockedBadge() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,6 @@ fun ConversationItem.ConnectionConversation.toUserInfoLabel() =
UserInfoLabel(
labelName = conversationInfo.name,
isLegalHold = isLegalHold,
membership = conversationInfo.membership
membership = conversationInfo.membership,
unavailable = conversationInfo.isSenderUnavailable
)

0 comments on commit f51420a

Please sign in to comment.