From 43a0631404a2540ce50e077bc902490e7eacc4f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20K=C3=BCrten?= <sebastian@mobanisto.de>
Date: Thu, 7 Oct 2021 11:44:26 +0200
Subject: [PATCH] Address review feedback for identicons

---
 .../org/briarproject/briar/desktop/paul/views/Identicon.kt  | 6 +-----
 .../briar/desktop/paul/views/PrivateMessageView.kt          | 5 ++---
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/main/kotlin/org/briarproject/briar/desktop/paul/views/Identicon.kt b/src/main/kotlin/org/briarproject/briar/desktop/paul/views/Identicon.kt
index f94e7b36b4..ce5eda40e6 100644
--- a/src/main/kotlin/org/briarproject/briar/desktop/paul/views/Identicon.kt
+++ b/src/main/kotlin/org/briarproject/briar/desktop/paul/views/Identicon.kt
@@ -47,11 +47,7 @@ internal class Identicon(private val input: ByteArray, width: Float, height: Flo
         colors = Array(ROWS) { Array(COLUMNS) { Color(0) } }
         for (r in 0 until ROWS) {
             for (c in 0 until COLUMNS) {
-                if (isCellVisible(r, c)) {
-                    colors[r][c] = foregroundColor
-                } else {
-                    colors[r][c] = backgroundColor
-                }
+                colors[r][c] = if (isCellVisible(r, c)) foregroundColor else backgroundColor
             }
         }
     }
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 29ad9a10a0..b990f43f5f 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
@@ -688,13 +688,12 @@ fun ContactDrawerMakeIntro(contact: Contact, contacts: List<Contact>, setInfoDra
             }
             Row(Modifier.fillMaxWidth().padding(12.dp), horizontalArrangement = Arrangement.SpaceAround) {
                 Column(Modifier.align(Alignment.CenterVertically)) {
-                    ProfileCircle(40.dp, contact.author.id.bytes)
+                    ProfileCircle(36.dp, contact.author.id.bytes)
                     Text(contact.author.name, Modifier.padding(top = 4.dp), Color.White, 16.sp)
                 }
                 Icon(Filled.SwapHoriz, "swap", modifier = Modifier.size(48.dp))
                 Column(Modifier.align(Alignment.CenterVertically)) {
-                    // TODO Profile pic again
-                    ProfileCircle(40.dp, contact.author.id.bytes)
+                    ProfileCircle(36.dp, introContact.author.id.bytes)
                     Text(introContact.author.name, Modifier.padding(top = 4.dp), Color.White, 16.sp)
                 }
             }
-- 
GitLab