@@ -40,23 +40,25 @@ module ViewConversations =
40 let preview =
40 let preview =
41 messagesFor c.Pubkey model.Messages
41 messagesFor c.Pubkey model.Messages
42 |> List.tryLast
42 |> List.tryLast
43+ |> Option.map (fun m ->
43− |> Option.map (fun m -> if m.Body.Length > 40 then m.Body.[..39] + "..." else m.Body)
44+ if m.Body.Length > 40 then m.Body.[..39] + "..." else m.Body)
44 |> Option.defaultValue ""
45 |> Option.defaultValue ""
47 (HStack(8.) {
48 (HStack(8.) {
49− Grid() {
50+ (Grid() {
50 (match c.Photo with
51 (match c.Photo with
51− | None -> Image("avares://Skrepka/Assets/Images/user.png", Stretch.Uniform)
53+ Image("avares://Skrepka/Assets/Images/user.png", Stretch.Uniform)
52 | Some i -> Image(cachedBitmap i, Stretch.UniformToFill))
55 | Some i -> Image(cachedBitmap i, Stretch.UniformToFill))
56 .clipToBounds (true)
56 .clipToBounds (true)
58 Rectangle().stroke(Colors.Black).strokeThickness (4.)
58 Rectangle().stroke(Colors.Black).strokeThickness (4.)
61 VStack(2.) {
63 VStack(2.) {
62 TextBlock(name)
64 TextBlock(name)