Skip to content

Commit

Permalink
Fix Switch warning on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Sep 17, 2024
1 parent 1fea856 commit 28ee25c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/OpenSwiftUI/View/Toggle/Switch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private struct Switch: UIViewRepresentable {
func updateUIView(_ uiView: UISwitch, context: Context) {
let isOn = isOn
let animated: Bool
if let animation = context.transaction.animation, !context.transaction.disablesAnimations {
if let _ = context.transaction.animation, !context.transaction.disablesAnimations {
animated = true
} else {
animated = false
Expand All @@ -38,7 +38,7 @@ private struct Switch: UIViewRepresentable {
uiView.preferredStyle = .sliding

let color: UIColor?
if let tint {
if let _ = tint {
// TODO: Resolve the color from the environment
color = nil
} else {
Expand Down

0 comments on commit 28ee25c

Please sign in to comment.