From d51806c93dd011e714057c4da1577bf4ea1f0c01 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Fri, 4 Sep 2026 17:19:23 +0000 Subject: [PATCH] ui: fix the first chat profile's avatar stored as its description Profile is (displayName, fullName, shortDescr, description, image, ...), so passing image as the fourth positional argument stored it in description and the avatar was dropped; #7256 inserted description before image and this call was not updated. Pass it by name. The bio typed on the same screen was never passed on this path; pass it as shortDescr, as createProfileInProfiles does. --- .../kotlin/chat/simplex/common/views/WelcomeView.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/WelcomeView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/WelcomeView.kt index e4a187783a..0e379b4b98 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/WelcomeView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/WelcomeView.kt @@ -164,7 +164,7 @@ fun CreateProfile(chatModel: ChatModel, close: () -> Unit) { if (chatModel.localUserCreated.value == true) { createProfileInProfiles(chatModel, displayName.value, shortDescr.value, profileImage.value, close) } else { - createProfileInNoProfileSetup(displayName.value, profileImage.value, close) + createProfileInNoProfileSetup(displayName.value, shortDescr.value, profileImage.value, close) } }, ) @@ -353,9 +353,9 @@ private fun CreateFirstProfileDesktop(chatModel: ChatModel, close: () -> Unit) { } } -fun createProfileInNoProfileSetup(displayName: String, image: String? = null, close: () -> Unit) { +fun createProfileInNoProfileSetup(displayName: String, shortDescr: String, image: String? = null, close: () -> Unit) { withBGApi { - val user = controller.apiCreateActiveUser(null, Profile(displayName.trim(), "", null, image)) ?: return@withBGApi + val user = controller.apiCreateActiveUser(null, Profile(displayName.trim(), "", shortDescr.trim().ifEmpty { null }, image = image)) ?: return@withBGApi if (!chatModel.connectedToRemote()) { chatModel.localUserCreated.value = true }