another.im-ios/ConversationsClassic/View/Screens/Attachments/AttachmentPickerScreen.swift

40 lines
951 B
Swift
Raw Normal View History

2024-07-02 09:56:27 +00:00
import SwiftUI
struct AttachmentPickerScreen: View {
@EnvironmentObject var store: AppStore
@State private var selectedTab: AttachmentTab = .media
var body: some View {
ZStack {
// Background color
Color.Main.backgroundLight
.ignoresSafeArea()
// Content
VStack(spacing: 0) {
// Header
AttachmentHeader()
// Pickers
2024-07-02 10:23:27 +00:00
switch selectedTab {
case .media:
AttachmentMediaPickerView()
case .files:
AttachmentFilesPickerView()
case .location:
AttachmentLocationPickerView()
case .contacts:
AttachmentContactsPickerView()
}
2024-07-02 09:56:27 +00:00
// Tab bar
AttachmentTabBar(selectedTab: $selectedTab)
}
}
}
}