Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix shimmer causing navigation items to animate
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHeaps committed Oct 20, 2023
1 parent 3d78696 commit c30e143
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Sources/BraveUI/SwiftUI/Shimmer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,10 @@ private struct ShimmerViewModifier: ViewModifier {
endPoint: points.1
)
.onAppear {
if #available(iOS 16, *) {
DispatchQueue.main.async { [self] in // Need this due to a SwiftUI bug…
withAnimation(animation) {
points = (.trailing, UnitPoint(x: 2, y: 0.5))
}
} else {
DispatchQueue.main.async { [self] in // Need this due to a SwiftUI bug…
withAnimation(animation) {
points = (.trailing, UnitPoint(x: 2, y: 0.5))
}
}
}
}
}
Expand Down

0 comments on commit c30e143

Please sign in to comment.