mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-28 17:49:07 +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 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:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user