another.im-ios/Monal/another.im/Views/Conversation/ConversationSettingsScreen.swift
2024-11-28 16:46:16 +01:00

42 lines
1.2 KiB
Swift

import Combine
import Foundation
import SwiftUI
struct ConversationSettingsScreen: View {
@EnvironmentObject var chatWrapper: MonalChatWrapper
@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()
}
),
centerText: .init(text: chatWrapper.chatTitle)
)
// Settings list
ScrollView {
LazyVStack(spacing: 0) {
SharedListRow(
iconType: .none,
text: L10n.Conversation.Settings.enableOmemo,
controlType: .switcher(isOn: $chatWrapper.isOmemoEnabled)
)
}
}
}
}
}
}