@@ -108,11 +108,13 @@ module App =
108 | NoIdentity -> model
108 | NoIdentity -> model
110 let private saveCmdMsg model : CmdMsg =
110 let private saveCmdMsg model : CmdMsg =
111− CmdSaveData
111+ CmdSaveData(
112− ({ Contacts = model.Contacts
112+ { Contacts = model.Contacts
113− Messages = model.Messages
113+ Messages = model.Messages
114− ServerUrl = model.ServerUrl
114+ ServerUrl = model.ServerUrl
115− PollCursor = model.PollCursor } : Data)
115+ PollCursor = model.PollCursor }
117 // ── Init ──
119 // ── Init ──
@@ -254,15 +256,15 @@ module App =
255 | DoSaveContact ->
257 | DoSaveContact ->
256 match model.Page with
258 match model.Page with
257− | AddContact(cpk, cnn) when cpk <> "" && cnn <> "" ->
259+ | AddContact(cpk) when cpk <> "" ->
258 match tryParsePubkey cpk with
260 match tryParsePubkey cpk with
259 | Some bytes ->
261 | Some bytes ->
260 let hex = Crypto.toHex bytes
262 let hex = Crypto.toHex bytes
262 let contact =
264 let contact =
263 match Map.tryFind hex model.Contacts with
265 match Map.tryFind hex model.Contacts with
264− | Some e -> { e with Nickname = cnn }
266+ | Some e -> { e with Nickname = cpk }
265− | None -> newContact hex cnn
267+ | None -> newContact hex cpk
267 let model' =
269 let model' =
268 { model with
270 { model with
@@ -598,8 +600,7 @@ module App =
598 | CmdSaveProfile profile -> Cmd.ofEffect (fun _ -> Store.saveProfile profile |> Async.Start)
600 | CmdSaveProfile profile -> Cmd.ofEffect (fun _ -> Store.saveProfile profile |> Async.Start)
600 | CmdSubscribeKeyboard ->
602 | CmdSubscribeKeyboard ->
601− Cmd.ofEffect (fun dispatch ->
602− Keyboard.heightChanged.Add(fun h -> dispatch (KeyboardHeightChanged h)))
603+ Cmd.ofEffect (fun dispatch -> Keyboard.heightChanged.Add(fun h -> dispatch (KeyboardHeightChanged h)))
604 // ── View ──
605 // ── View ──
@@ -610,12 +611,12 @@ module App =
610 | Settings -> AnyView(viewSettings model)
611 | Settings -> AnyView(viewSettings model)
611 | Conversations -> AnyView(viewConversations model)
612 | Conversations -> AnyView(viewConversations model)
612 | Chat(pk, compose) -> AnyView(viewChat model pk compose)
613 | Chat(pk, compose) -> AnyView(viewChat model pk compose)
613− | AddContact(pk, nn) -> AnyView(viewAddContact model pk nn)
614+ | AddContact(pk) -> AnyView(viewAddContact model pk)
614 | EditProfile(displayName, bio, photo) -> AnyView(viewEditProfile model displayName bio photo)
615 | EditProfile(displayName, bio, photo) -> AnyView(viewEditProfile model displayName bio photo)
616 Border(page)
617 Border(page)
617 .background(SolidColorBrush(Colors.White))
618 .background(SolidColorBrush(Colors.White))
618− .padding(Avalonia.Thickness(0., 0., 0., model.KeyboardHeight))
619+ .padding (Avalonia.Thickness(0., 0., 0., model.KeyboardHeight))
620 let view model =
621 let view model =
621#if MOBILE
622#if MOBILE