mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 02:12:25 +00:00
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.
This commit is contained in:
1 parent
139ce5f8cc
commit
d51806c93d
1 file changed
+3
-3
+3
-3
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user