File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Sources/StreamChatSwiftUI/ChatChannel/MessageList Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -380,12 +380,16 @@ struct ScrollPositionModifier: ViewModifier {
380380 @Binding var scrollPosition : String ?
381381
382382 func body( content: Content ) -> some View {
383+ #if swift(>=5.9)
383384 if #available( iOS 17 , * ) {
384385 content
385386 . scrollPosition ( id: $scrollPosition, anchor: . top)
386387 } else {
387388 content
388389 }
390+ #else
391+ content
392+ #endif
389393 }
390394}
391395
@@ -397,13 +401,17 @@ struct ScrollTargetLayoutModifier: ViewModifier {
397401 if !enabled {
398402 return content
399403 }
404+ #if swift(>=5.9)
400405 if #available( iOS 17 , * ) {
401406 return content
402407 . scrollTargetLayout ( isEnabled: enabled)
403408 . scrollTargetBehavior ( . paging)
404409 } else {
405410 return content
406411 }
412+ #else
413+ return content
414+ #endif
407415 }
408416}
409417
You can’t perform that action at this time.
0 commit comments