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:
committed by
GitHub
parent
7e2f365c1c
commit
cb602dd377
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user