File tree Expand file tree Collapse file tree
Sources/AboutWindow/Views Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111import SwiftUI
1212
13+ @MainActor
1314private struct ScrollViewOffsetPreferenceKey : @preconcurrency PreferenceKey {
1415 typealias Value = [ CGFloat ]
1516
16- @ MainActor static var defaultValue : [ CGFloat ] = [ 0 ]
17+ static var defaultValue : [ CGFloat ] = [ 0 ]
1718
18- static func reduce( value: inout [ CGFloat ] , nextValue: ( ) -> [ CGFloat ] ) {
19+ nonisolated static func reduce( value: inout [ CGFloat ] , nextValue: ( ) -> [ CGFloat ] ) {
1920 value. append ( contentsOf: nextValue ( ) )
2021 }
2122}
@@ -79,7 +80,7 @@ struct TrackableScrollView<Content>: View where Content: View {
7980 }
8081 }
8182 }
82- . onPreferenceChange ( ScrollViewOffsetPreferenceKey . self) { value in
83+ . onPreferenceChange ( ScrollViewOffsetPreferenceKey . self) { @ MainActor value in
8384 self . contentOffset = value [ 0 ]
8485 if self . contentTrailingOffset != nil {
8586 self . contentTrailingOffset = value [ 1 ]
You can’t perform that action at this time.
0 commit comments