2024-11-23 23:22:07 +00:00
|
|
|
import Combine
|
|
|
|
import Foundation
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct ConversationSettingsScreen: View {
|
2024-11-28 15:46:16 +00:00
|
|
|
@EnvironmentObject var chatWrapper: MonalChatWrapper
|
2024-11-23 23:22:07 +00:00
|
|
|
@Environment(\.router) var router
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
ZStack {
|
|
|
|
// Background color
|
|
|
|
Color.Material.Background.light
|
|
|
|
.ignoresSafeArea()
|
|
|
|
|
|
|
|
// Content
|
|
|
|
VStack(spacing: 0) {
|
|
|
|
// Header
|
|
|
|
SharedNavigationBar(
|
|
|
|
leftButton: .init(
|
|
|
|
image: Image(systemName: "chevron.left"),
|
|
|
|
action: {
|
|
|
|
router.dismissScreen()
|
|
|
|
}
|
|
|
|
),
|
2024-11-28 15:46:16 +00:00
|
|
|
centerText: .init(text: chatWrapper.chatTitle)
|
2024-11-23 23:22:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Settings list
|
2024-11-28 15:46:16 +00:00
|
|
|
ScrollView {
|
|
|
|
LazyVStack(spacing: 0) {
|
|
|
|
SharedListRow(
|
|
|
|
iconType: .none,
|
|
|
|
text: L10n.Conversation.Settings.enableOmemo,
|
|
|
|
controlType: .switcher(isOn: $chatWrapper.isOmemoEnabled)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2024-11-23 23:22:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|