on master help sign in
Sort contacts by last message and anchor list to bottom
commit68c43e558c831f8aab1f960607a04dcb2ed43aa7 authoriko <mail@iko.soy> dateSun 19 Apr 2026, 00:43 (6 months ago) parent9d1c525
1 file changed+10−2
client/ViewConversations.fs+10−2
client/ViewConversations.fs+10−2
@@ -14,7 +14,14 @@ module ViewConversations =
1414 open Avalonia.Layout
1515
1616 let viewConversations model =
17− let contacts = model.Contacts.Values |> Seq.toList
17+ let contacts =
18+ model.Contacts.Values
19+ |> Seq.toList
20+ |> List.sortBy (fun c ->
21+ messagesFor c.Pubkey model.Messages
22+ |> List.tryLast
23+ |> Option.map (fun m -> m.Timestamp)
24+ |> Option.defaultValue System.DateTimeOffset.MinValue)
1825
1926 let content =
2027 if contacts.IsEmpty then
@@ -70,7 +77,8 @@ module ViewConversations =
7077 .onTapped (fun _ -> SetPage(Chat(c.Pubkey, "")))
7178 )
7279 .styles(noListBoxPadding ())
73− .background (Colors.White)
80+ .background(Colors.White)
81+ .verticalAlignment (VerticalAlignment.Bottom)
7482 )
7583
7684 let bar =