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 stores it in
description and the avatar is silently dropped. Both are String?, so it
type-checks.

Reached from the user picker's "Create chat profile" row, which is
desktop-only (chatModel.desktopNoUserNoRemote).
This commit is contained in:
Narasimha-sc
2026-09-04 17:19:23 +00:00
parent a0b6643932
commit eaf137ec18
@@ -355,7 +355,7 @@ private fun CreateFirstProfileDesktop(chatModel: ChatModel, close: () -> Unit) {
fun createProfileInNoProfileSetup(displayName: 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(), "", null, image = image)) ?: return@withBGApi
if (!chatModel.connectedToRemote()) {
chatModel.localUserCreated.value = true
}