Skip to content

Commit

Permalink
[ci skip] Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
d-date authored and github-actions[bot] committed Mar 15, 2024
1 parent d05a47a commit 1278685
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions MyLibrary/Sources/ScheduleFeature/Detail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public struct ScheduleDetail {
public enum Destination {
case safari(Safari)
}

@Dependency(\.openURL) var openURL

public init() {}
Expand All @@ -50,10 +50,10 @@ public struct ScheduleDetail {
switch action {
case let .view(.snsTapped(url)):
#if os(iOS) || os(macOS)
state.destination = .safari(.init(url: url))
return .none
state.destination = .safari(.init(url: url))
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case .destination:
return .none
Expand Down
8 changes: 4 additions & 4 deletions MyLibrary/Sources/ScheduleFeature/Schedule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ public struct Schedule {
case .view(.mapItemTapped):
let url = URL(string: String(localized: "Guidance URL", bundle: .module))!
#if os(iOS) || os(macOS)
state.destination = .guidance(.init(url: url))
return .none
state.destination = .guidance(.init(url: url))
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case .binding, .path, .destination:
return .none
Expand All @@ -106,7 +106,7 @@ public struct Schedule {
public struct ScheduleView: View {

@Bindable public var store: StoreOf<Schedule>

let mapTip: MapTip = .init()

public init(store: StoreOf<Schedule>) {
Expand Down
6 changes: 3 additions & 3 deletions MyLibrary/Sources/SponsorFeature/Sponsors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public struct SponsorsList {
case let .view(.sponsorTapped(sponsor)):
guard let url = sponsor.link else { return .none }
#if os(iOS) || os(macOS)
state.destination = .safari(.init(url: url))
return .none
state.destination = .safari(.init(url: url))
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case .binding:
return .none
Expand Down
8 changes: 4 additions & 4 deletions MyLibrary/Sources/trySwiftFeature/Acknowledgements.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ public struct Acknowledgements {
case urlTapped(URL)
case safari(PresentationAction<Safari.Action>)
}

@Dependency(\.openURL) var openURL

public var body: some ReducerOf<Self> {
Reduce { state, action in
switch action {
case let .urlTapped(url):
#if os(iOS) || os(macOS)
state.safari = .init(url: url)
return .none
state.safari = .init(url: url)
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case .safari:
return .none
Expand Down
8 changes: 4 additions & 4 deletions MyLibrary/Sources/trySwiftFeature/Profile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public struct Profile {
}

@Dependency(\.openURL) var openURL

public init() {}

public var body: some ReducerOf<Self> {
Expand All @@ -41,10 +41,10 @@ public struct Profile {
switch action {
case let .view(.snsTapped(url)):
#if os(iOS) || os(macOS)
state.destination = .safari(.init(url: url))
return .none
state.destination = .safari(.init(url: url))
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case .destination:
return .none
Expand Down
26 changes: 13 additions & 13 deletions MyLibrary/Sources/trySwiftFeature/trySwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public struct TrySwift {
public enum Destination {
case safari(Safari)
}

@Dependency(\.openURL) var openURL

public init() {}
Expand All @@ -55,37 +55,37 @@ public struct TrySwift {
case .view(.codeOfConductTapped):
let url = URL(string: String(localized: "Code of Conduct URL", bundle: .module))!
#if os(iOS) || os(macOS)
state.destination = .safari(.init(url: url))
return .none
state.destination = .safari(.init(url: url))
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case .view(.privacyPolicyTapped):
let url = URL(string: String(localized: "Privacy Policy URL", bundle: .module))!
#if os(iOS) || os(macOS)
state.destination = .safari(.init(url: url))
return .none
state.destination = .safari(.init(url: url))
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case .view(.acknowledgementsTapped):
state.path.append(.acknowledgements(.init()))
return .none
case .view(.eventbriteTapped):
let url = URL(string: String(localized: "Eventbrite URL", bundle: .module))!
#if os(iOS) || os(macOS)
state.destination = .safari(.init(url: url))
return .none
state.destination = .safari(.init(url: url))
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case .view(.websiteTapped):
let url = URL(string: String(localized: "Website URL", bundle: .module))!
#if os(iOS) || os(macOS)
state.destination = .safari(.init(url: url))
return .none
state.destination = .safari(.init(url: url))
return .none
#elseif os(visionOS)
return .run { _ in await openURL(url) }
return .run { _ in await openURL(url) }
#endif
case let .path(.element(_, .organizers(.delegate(.organizerTapped(organizer))))):
state.path.append(.profile(.init(organizer: organizer)))
Expand Down

0 comments on commit 1278685

Please sign in to comment.