Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw authored and github-actions[bot] committed Aug 13, 2024
1 parent dae1b9a commit 27adbdc
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,53 @@ public final class GameViewController: UIViewController {
let titleLabel = UILabel()
titleLabel.textAlignment = .center

let playAgainButton = UIButton(type: .system, primaryAction: UIAction { [store] _ in
store.send(.playAgainButtonTapped)
})
let playAgainButton = UIButton(
type: .system,
primaryAction: UIAction { [store] _ in
store.send(.playAgainButtonTapped)
})
playAgainButton.setTitle("Play again?", for: .normal)

let titleStackView = UIStackView(arrangedSubviews: [titleLabel, playAgainButton])
titleStackView.axis = .vertical
titleStackView.spacing = 12

let gridCell11 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 0, column: 0))
})
let gridCell21 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 1, column: 0))
})
let gridCell31 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 2, column: 0))
})
let gridCell12 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 0, column: 1))
})
let gridCell22 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 1, column: 1))
})
let gridCell32 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 2, column: 1))
})
let gridCell13 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 0, column: 2))
})
let gridCell23 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 1, column: 2))
})
let gridCell33 = UIButton(primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 2, column: 2))
})
let gridCell11 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 0, column: 0))
})
let gridCell21 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 1, column: 0))
})
let gridCell31 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 2, column: 0))
})
let gridCell12 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 0, column: 1))
})
let gridCell22 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 1, column: 1))
})
let gridCell32 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 2, column: 1))
})
let gridCell13 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 0, column: 2))
})
let gridCell23 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 1, column: 2))
})
let gridCell33 = UIButton(
primaryAction: UIAction { [store] _ in
store.send(.cellTapped(row: 2, column: 2))
})

let cells = [
[gridCell11, gridCell12, gridCell13],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ public class LoginViewController: UIViewController {
passwordTextField.borderStyle = .roundedRect
passwordTextField.isSecureTextEntry = true

let loginButton = UIButton(type: .system, primaryAction: UIAction { [weak self] _ in
self?.send(.loginButtonTapped)
})
let loginButton = UIButton(
type: .system,
primaryAction: UIAction { [weak self] _ in
self?.send(.loginButtonTapped)
})
loginButton.setTitle("Login", for: .normal)

let activityIndicator = UIActivityIndicatorView(style: .large)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ public class NewGameViewController: UIViewController {
])
playerORow.spacing = 24

let letsPlayButton = UIButton(type: .system, primaryAction: UIAction { [store] _ in
store.send(.letsPlayButtonTapped)
})
let letsPlayButton = UIButton(
type: .system,
primaryAction: UIAction { [store] _ in
store.send(.letsPlayButtonTapped)
})
letsPlayButton.setTitle("Let’s Play!", for: .normal)

let rootStackView = UIStackView(arrangedSubviews: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ public final class TwoFactorViewController: UIViewController {
codeTextField.placeholder = "1234"
codeTextField.borderStyle = .roundedRect

let loginButton = UIButton(type: .system, primaryAction: UIAction { [weak self] _ in
self?.send(.submitButtonTapped)
})
let loginButton = UIButton(
type: .system,
primaryAction: UIAction { [weak self] _ in
self?.send(.submitButtonTapped)
})
loginButton.setTitle("Login", for: .normal)

let activityIndicator = UIActivityIndicatorView(style: .large)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@
id: path.wrappedValue.id(
state:
\.[
id: component.id,
fileID: _HashableStaticString(rawValue: fileID),
filePath: _HashableStaticString(rawValue: filePath),
line: line,
column: column
id:component.id,fileID:_HashableStaticString(
rawValue: fileID),filePath:_HashableStaticString(
rawValue: filePath),line:line,column:column
],
action: \.[id: component.id]
action: \.[id:component.id]
),
state: ToState {
element = $0[id: component.id] ?? element
Expand Down

0 comments on commit 27adbdc

Please sign in to comment.