From 73295e726a5b6e6c395c28f3bd60df79073cffd6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 22 Nov 2025 19:54:36 +0100 Subject: [PATCH] Fix iOS comments scrolling issue in video details view Comments at the bottom of the comments view were not accessible on iOS without entering fullscreen mode. The issue was caused by the VideoDetails view being offset by the player height when not in fullscreen, but the ScrollView padding didn't account for this offset. Changes: - Add SafeAreaModel observer for iOS platform - Update bottom padding to dynamically account for player height offset and safe area insets based on fullscreen state - When not in fullscreen: padding = player height + safe area bottom + 20 - When in fullscreen: padding = max(60, safe area bottom + 20) This ensures all comments and video details content are fully scrollable and visible regardless of fullscreen state. --- Shared/Player/Video Details/VideoDetails.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Shared/Player/Video Details/VideoDetails.swift b/Shared/Player/Video Details/VideoDetails.swift index 131bb3b2..6d3b4d2b 100644 --- a/Shared/Player/Video Details/VideoDetails.swift +++ b/Shared/Player/Video Details/VideoDetails.swift @@ -189,6 +189,7 @@ struct VideoDetails: View { @Environment(\.navigationStyle) private var navigationStyle #if os(iOS) @Environment(\.verticalSizeClass) private var verticalSizeClass + @ObservedObject private var safeAreaModel = SafeAreaModel.shared #endif @Environment(\.colorScheme) private var colorScheme @@ -397,7 +398,11 @@ struct VideoDetails: View { } } } + #if os(iOS) + .padding(.bottom, fullScreen ? max(60, safeAreaModel.safeArea.bottom + 20) : player.playerSize.height + safeAreaModel.safeArea.bottom + 20) + #else .padding(.bottom, 60) + #endif } #if os(iOS) .onAppear {