mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Configured and applied SwiftFormat
This commit is contained in:
committed by
Stefan Ceriu
parent
ff2e6ddfa7
commit
43c28d23b7
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct FormPickerItem: View {
|
||||
|
||||
typealias TapCallback = () -> Void
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
@@ -53,7 +52,6 @@ struct FormPickerItem: View {
|
||||
}
|
||||
|
||||
struct FormPickerItem_Previews: PreviewProvider {
|
||||
|
||||
static let items = ["Item 1", "Item 2", "Item 3"]
|
||||
static var selected: String = items[0]
|
||||
static var previews: some View {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct FormSectionFooter: View {
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
var text: String
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct FormSectionHeader: View {
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
var text: String
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct RoomNotificationSettings: View {
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
|
||||
@ObservedObject var viewModel: RoomNotificationSettingsSwiftUIViewModel
|
||||
@@ -42,7 +41,7 @@ struct RoomNotificationSettings: View {
|
||||
|
||||
var body: some View {
|
||||
VectorForm {
|
||||
if let avatarData = viewModel.viewState.avatarData as? AvatarInputProtocol {
|
||||
if let avatarData = viewModel.viewState.avatarData as? AvatarInputProtocol {
|
||||
RoomNotificationSettingsHeader(
|
||||
avatarData: avatarData,
|
||||
displayName: viewModel.viewState.displayName
|
||||
@@ -74,7 +73,6 @@ struct RoomNotificationSettings: View {
|
||||
}
|
||||
|
||||
struct RoomNotificationSettings_Previews: PreviewProvider {
|
||||
|
||||
static let mockViewModel = RoomNotificationSettingsSwiftUIViewModel(
|
||||
roomNotificationService: MockRoomNotificationSettingsService.example,
|
||||
avatarData: MockAvatarInput.example,
|
||||
|
||||
+1
-2
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct RoomNotificationSettingsHeader: View {
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
var avatarData: AvatarInputProtocol
|
||||
var displayName: String?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct VectorForm<Content: View>: View {
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
var content: () -> Content
|
||||
|
||||
@@ -38,12 +37,10 @@ struct VectorForm<Content: View>: View {
|
||||
)
|
||||
.background(theme.colors.system)
|
||||
.edgesIgnoringSafeArea(.bottom)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
struct VectorForm_Previews: PreviewProvider {
|
||||
|
||||
static var previews: some View {
|
||||
Group {
|
||||
VectorForm {
|
||||
|
||||
Reference in New Issue
Block a user