diff --git a/src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt b/src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt index 75b05dd5e3d839cdeae91eb2380feef94a8e574b..6a33c7839195caaa4db651b6fd428f1f1772570f 100644 --- a/src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt +++ b/src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt @@ -267,11 +267,15 @@ fun ProfileCircle(bitmap: ImageBitmap, size: Dp) { } @Composable -fun ContactCard(contact: Contact, selContact: Contact, onSel: (Contact) -> Unit, drawDetails: Boolean) { - var bgColor = briarBlack - if (selContact.id == contact.id && drawDetails) { - bgColor = darkGray - } +fun ContactCard( + contact: Contact, + selContact: Contact, + onSel: (Contact) -> Unit, + selected: Boolean, + drawNotifications: Boolean +) { + // selContact.id == contact.id && drawNotifications + val bgColor = if (selected) darkGray else briarBlack Row( modifier = Modifier.fillMaxWidth().height(HEADER_SIZE).background(bgColor) .clickable(onClick = { onSel(contact) }), @@ -281,7 +285,7 @@ fun ContactCard(contact: Contact, selContact: Contact, onSel: (Contact) -> Unit, // TODO Pull profile pictures ProfileCircle(imageFromResource("images/profile_images/p0.png"), 36.dp) // Draw notification badges - if (drawDetails) { + if (drawNotifications) { androidx.compose.foundation.Canvas( modifier = Modifier.align(Alignment.CenterVertically), onDraw = { @@ -378,7 +382,7 @@ fun ContactList( content = { Column(Modifier.verticalScroll(rememberScrollState())) { for (c in filteredContacts) { - ContactCard(c, currContact, onContactSelect, true) + ContactCard(c, currContact, onContactSelect, currContact.id == c.id, true) } } }, @@ -672,7 +676,7 @@ fun ContactDrawerMakeIntro(currContact: Contact, contacts: List<Contact>, setInf Column(Modifier.verticalScroll(rememberScrollState())) { for (c in contacts) { if (c.id != currContact.id) { - ContactCard(c, currContact, { onCancelSel(c); introNextPg = true }, false) + ContactCard(c, currContact, { onCancelSel(c); introNextPg = true }, false, false) } } }