@@ -16,16 +16,15 @@ module ViewConversations =
1616 let viewConversations model =
1717 let contacts = model.Contacts.Values |> Seq.toList
1818
19− (Grid([], [ Dimension.Star; Dimension.Auto ]) {
20−
19+ let content =
2120 if contacts.IsEmpty then
22− TextBlock("No contacts yet. Tap + to add one.")
23− .centerText()
24− .foreground(SolidColorBrush(Colors.Gray))
25− .gridRow (1)
26−
27− if not contacts.IsEmpty then
28− ListBox(
21+ AnyView(
22+ TextBlock("No contacts yet. Tap + to add one.")
23+ .centerText()
24+ .foreground(SolidColorBrush(Colors.Gray))
25+ )
26+ else
27+ AnyView(ListBox(
2928 contacts,
3029 fun c ->
3130 let name = contactName model.Contacts c.Pubkey
@@ -74,21 +73,15 @@ module ViewConversations =
7473 .onTapped (fun _ -> SetPage(Chat(c.Pubkey, "")))
7574 )
7675 .styles(noListBoxPadding ())
77− .background(Colors.White)
78− .gridRow (0)
79−
80− Border(
81− (Grid([ Dimension.Auto; Dimension.Star; Dimension.Auto ], []) {
82− (smallImageButton None (SetPage Settings)).gridColumn (0)
83− (textField "" Search).margin(0.).margin(8.).gridColumn (1)
84− (smallTextButton "+" (SetPage(AddContact("", "")))).gridColumn (2)
85− })
86− .margin(20.)
87− .horizontalAlignment (HorizontalAlignment.Stretch)
88− )
89− .borderThickness(Avalonia.Thickness(0., 4., 0., 0.))
90− .borderBrush(SolidColorBrush(Colors.Black))
91− .background(Constants.accentColor)
92− .gridRow (1)
93− })
94− .margin (0.)
76+ .background(Colors.White))
77+
78+ let bar =
79+ (Grid([ Dimension.Auto; Dimension.Star; Dimension.Auto ], []) {
80+ (smallImageButton None (SetPage Settings)).gridColumn (0)
81+ (textField "" Search).margin(0.).margin(8.).gridColumn (1)
82+ (smallTextButton "+" (SetPage(AddContact("", "")))).gridColumn (2)
83+ })
84+ .margin(20.)
85+ .horizontalAlignment (HorizontalAlignment.Stretch)
86+
87+ withBottomBar bar content