SimpleX-Chat/apps/ios/Shared/Views/Helpers/ChatListToolbar.swift
Evgeny Poberezkin 711207743b
add support for user addresses (#246)
* add support for user addresses

* started processing contact requests

* update command syntax

* fix: make Profile Codable

* accept/reject contact requests

* update API, accept/reject contact requests
2022-02-01 17:34:06 +00:00

42 lines
1.1 KiB
Swift

//
// ChatListToolbar.swift
// SimpleX
//
// Created by Evgeny Poberezkin on 29/01/2022.
// Copyright © 2022 SimpleX Chat. All rights reserved.
//
import SwiftUI
struct ChatListToolbar: View {
@EnvironmentObject var chatModel: ChatModel
var width: CGFloat
var body: some View {
HStack {
SettingsButton()
Spacer()
Text("Your chats")
.font(.title3)
Spacer()
NewChatButton()
}
.padding(.horizontal)
.frame(minWidth: width, maxWidth: .infinity, alignment: .center)
}
}
struct ChatListToolbar_Previews: PreviewProvider {
static var previews: some View {
let chatModel = ChatModel()
chatModel.chats = [
"@1": Chat(
chatInfo: sampleDirectChatInfo,
chatItems: [chatItemSample(1, .directSnd, Date.now, "hello")]
)
]
return ChatListToolbar(width: 300)
.previewLayout(.fixed(width: 300, height: 70))
.environmentObject(chatModel)
}
}