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 {
380
380
@Binding var scrollPosition : String ?
381
381
382
382
func body( content: Content ) -> some View {
383
+ #if swift(>=5.9)
383
384
if #available( iOS 17 , * ) {
384
385
content
385
386
. scrollPosition ( id: $scrollPosition, anchor: . top)
386
387
} else {
387
388
content
388
389
}
390
+ #else
391
+ content
392
+ #endif
389
393
}
390
394
}
391
395
@@ -397,13 +401,17 @@ struct ScrollTargetLayoutModifier: ViewModifier {
397
401
if !enabled {
398
402
return content
399
403
}
404
+ #if swift(>=5.9)
400
405
if #available( iOS 17 , * ) {
401
406
return content
402
407
. scrollTargetLayout ( isEnabled: enabled)
403
408
. scrollTargetBehavior ( . paging)
404
409
} else {
405
410
return content
406
411
}
412
+ #else
413
+ return content
414
+ #endif
407
415
}
408
416
}
409
417
You can’t perform that action at this time.
0 commit comments