Skip to content

Commit

Permalink
AccountOverviewForm: take closeBehavior into account
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskollmer committed Dec 9, 2024
1 parent 37df11e commit 9ce3fdd
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,21 @@ struct AccountOverviewForm<AdditionalSections: View>: View {
if !isProcessing {
ToolbarItem(placement: .cancellationAction) {
if editMode?.wrappedValue.isEditing == true {
Button(action: {
Button {
model.cancelEditAction(editMode: editMode)
}) {
} label: {
Text("CANCEL", bundle: .module)
}
} else {
Button(action: {
dismiss()
}) {
Text("CLOSE", bundle: .module)
switch closeBehavior {
case .disabled:
let _ = ()

Check failure on line 79 in Sources/SpeziAccount/Views/AccountOverview/AccountOverviewForm.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint / SwiftLint

Redundant Discardable Let Violation: Prefer `_ = foo()` over `let _ = foo()` when discarding a result from a function (redundant_discardable_let)
case .showCloseButton:
Button {
dismiss()
} label: {
Text("CLOSE", bundle: .module)
}
}
}
}
Expand Down

0 comments on commit 9ce3fdd

Please sign in to comment.