@@ -14,7 +14,14 @@ module ViewConversations =
14 open Avalonia.Layout
14 open Avalonia.Layout
16 let viewConversations model =
16 let viewConversations model =
17− let contacts = model.Contacts.Values |> Seq.toList
18+ model.Contacts.Values
20+ |> List.sortBy (fun c ->
21+ messagesFor c.Pubkey model.Messages
23+ |> Option.map (fun m -> m.Timestamp)
24+ |> Option.defaultValue System.DateTimeOffset.MinValue)
19 let content =
26 let content =
20 if contacts.IsEmpty then
27 if contacts.IsEmpty then
@@ -70,7 +77,8 @@ module ViewConversations =
70 .onTapped (fun _ -> SetPage(Chat(c.Pubkey, "")))
77 .onTapped (fun _ -> SetPage(Chat(c.Pubkey, "")))
72 .styles(noListBoxPadding ())
79 .styles(noListBoxPadding ())
73− .background (Colors.White)
80+ .background(Colors.White)
81+ .verticalAlignment (VerticalAlignment.Bottom)