Configured and applied SwiftFormat

This commit is contained in:
Stefan Ceriu
2022-09-27 10:17:22 +03:00
committed by Stefan Ceriu
parent ff2e6ddfa7
commit 43c28d23b7
663 changed files with 2329 additions and 2840 deletions
@@ -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,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 {