mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Fix ordering, add pragmas, fix visibility on a few functions, remove default param on state.
This commit is contained in:
+20
-12
@@ -19,20 +19,12 @@ import SwiftUI
|
||||
@available(iOS 14.0, *)
|
||||
struct TemplateUserProfile: View {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
@ObservedObject var viewModel: TemplateUserProfileViewModel
|
||||
|
||||
var leftButton: some View {
|
||||
Button(VectorL10n.cancel) {
|
||||
viewModel.proccess(viewAction: .cancel)
|
||||
}
|
||||
}
|
||||
|
||||
var rightButton: some View {
|
||||
Button(VectorL10n.done) {
|
||||
viewModel.proccess(viewAction: .cancel)
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
@@ -57,8 +49,24 @@ struct TemplateUserProfile: View {
|
||||
.navigationTitle(viewModel.viewState.displayName ?? "")
|
||||
.navigationBarItems(leading: leftButton, trailing: rightButton)
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private var leftButton: some View {
|
||||
Button(VectorL10n.cancel) {
|
||||
viewModel.proccess(viewAction: .cancel)
|
||||
}
|
||||
}
|
||||
|
||||
private var rightButton: some View {
|
||||
Button(VectorL10n.done) {
|
||||
viewModel.proccess(viewAction: .cancel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct TemplateUserProfile_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
|
||||
Reference in New Issue
Block a user