Skip to content

Commit

Permalink
Fix SwiftLint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuravi committed May 28, 2024
1 parent 489e6a7 commit a2f1feb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions StrokeCog/Map/RefreshIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct RefreshIcon: View {
.onDisappear {
rotationAngle = 0
}
.accessibilityLabel("Refreshing map")
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions StrokeCog/Map/StrokeCogMapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ struct StrokeCogMapView: View {
@State private var isRefreshing = false

var body: some View {
// swiftlint:disable closure_body_length accessibility_label_for_image
NavigationStack {
ZStack {
MapManagerViewWrapper()
Expand Down Expand Up @@ -52,20 +51,13 @@ struct StrokeCogMapView: View {
refreshMap()
}) {
Image(systemName: "arrow.clockwise")
.accessibilityLabel("Refresh map")
}
}
}
}
}

private func refreshMap() {
Task {
isRefreshing = true
await locationModule.fetchLocations()
isRefreshing = false
}
}

private var optionsPanelButton: some View {
Button {
withAnimation {
Expand All @@ -84,6 +76,14 @@ struct StrokeCogMapView: View {
init(presentingAccount: Binding<Bool>) {
self._presentingAccount = presentingAccount
}

private func refreshMap() {
Task {
isRefreshing = true
await locationModule.fetchLocations()
isRefreshing = false
}
}
}

struct StrokeCogMapView_Previews: PreviewProvider {
Expand Down

0 comments on commit a2f1feb

Please sign in to comment.