show received messages in chat, send command on Enter, fix Date parsing (#237)

* refactor UI and API, send command on Enter, fix Date parsing

* UI sheets to create connection and groups

* show received messages

* readme
This commit is contained in:
Evgeny Poberezkin
2022-01-29 23:37:02 +00:00
committed by GitHub
parent 7e2f365c1c
commit cb602dd377
20 changed files with 546 additions and 176 deletions

View File

@@ -71,7 +71,14 @@ struct ContentView: View {
var body: some View {
if let user = chatModel.currentUser {
ChatListView(user: user)
.onAppear { chatSendCmd(chatModel, .apiGetChats) }
.onAppear {
do {
let chats = try apiGetChats()
chatModel.chatPreviews = chats
} catch {
print(error)
}
}
} else {
WelcomeView()
}