conversations-classic-ios/ConversationsClassic/View/Screens/Sharing/SharingPickerScreen.swift

40 lines
935 B
Swift
Raw Normal View History

2024-07-02 09:56:27 +00:00
import SwiftUI
struct AttachmentPickerScreen: View {
@EnvironmentObject var store: AppStore
2024-07-13 13:58:38 +00:00
@State private var selectedTab: SharingTab = .media
2024-07-02 09:56:27 +00:00
var body: some View {
ZStack {
// Background color
2024-07-04 08:21:12 +00:00
Color.Material.Background.light
2024-07-02 09:56:27 +00:00
.ignoresSafeArea()
// Content
VStack(spacing: 0) {
// Header
2024-07-13 13:58:38 +00:00
SharingHeader()
2024-07-02 09:56:27 +00:00
// Pickers
2024-07-02 10:23:27 +00:00
switch selectedTab {
case .media:
2024-07-13 13:58:38 +00:00
SharingMediaPickerView()
2024-07-02 10:23:27 +00:00
case .files:
2024-07-13 13:58:38 +00:00
SharingFilesPickerView()
2024-07-02 10:23:27 +00:00
case .location:
2024-07-13 13:58:38 +00:00
SharingLocationPickerView()
2024-07-02 10:23:27 +00:00
case .contacts:
2024-07-13 13:58:38 +00:00
SharingContactsPickerView()
2024-07-02 10:23:27 +00:00
}
2024-07-02 09:56:27 +00:00
// Tab bar
2024-07-13 13:58:38 +00:00
SharingTabBar(selectedTab: $selectedTab)
2024-07-02 09:56:27 +00:00
}
}
}
}