diff --git a/ios/Platform/Platform/Features/Fitness/Views/MealSectionView.swift b/ios/Platform/Platform/Features/Fitness/Views/MealSectionView.swift index a56c4f4..ab9ec96 100644 --- a/ios/Platform/Platform/Features/Fitness/Views/MealSectionView.swift +++ b/ios/Platform/Platform/Features/Fitness/Views/MealSectionView.swift @@ -47,12 +47,14 @@ struct MealSectionView: View { Spacer() - Text("\(Int(totalCalories))") - .font(.title3.weight(.bold)) - .foregroundStyle(Color.mealColor(for: mealType.rawValue)) - + Text(" kcal") - .font(.caption.weight(.medium)) - .foregroundStyle(Color.textSecondary) + HStack(spacing: 2) { + Text("\(Int(totalCalories))") + .font(.title3.weight(.bold)) + .foregroundStyle(Color.mealColor(for: mealType.rawValue)) + Text("kcal") + .font(.caption.weight(.medium)) + .foregroundStyle(Color.textSecondary) + } Image(systemName: "chevron.right") .font(.caption.weight(.medium)) diff --git a/ios/Platform/Platform/Features/Reader/Views/ArticleWebView.swift b/ios/Platform/Platform/Features/Reader/Views/ArticleWebView.swift index 58fe0fd..90e6378 100644 --- a/ios/Platform/Platform/Features/Reader/Views/ArticleWebView.swift +++ b/ios/Platform/Platform/Features/Reader/Views/ArticleWebView.swift @@ -16,7 +16,8 @@ final class ArticleRenderer { // Create at screen size so WebKit initializes the GPU compositor // during warmup, not on first article open. - webView = WKWebView(frame: UIScreen.main.bounds, configuration: config) + let screenBounds = (UIApplication.shared.connectedScenes.first as? UIWindowScene)?.screen.bounds ?? CGRect(x: 0, y: 0, width: 393, height: 852) + webView = WKWebView(frame: screenBounds, configuration: config) webView.isOpaque = false webView.backgroundColor = .clear webView.scrollView.isScrollEnabled = true diff --git a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift index a69e03e..b8f5cc8 100644 --- a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift +++ b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift @@ -14,9 +14,10 @@ struct EntryListView: View { @State private var cumulativeUp: CGFloat = 0 @State private var markedByScroll: Set = [] - // Viewport height — measured once from screen bounds. - // Safe because this view only appears on iPhone in portrait/landscape. - private var viewportHeight: CGFloat { UIScreen.main.bounds.height } + // Viewport height — use the first connected scene's screen. + private var viewportHeight: CGFloat { + (UIApplication.shared.connectedScenes.first as? UIWindowScene)?.screen.bounds.height ?? 800 + } // Fixed threshold — per-entry deltas are small (~1-2pt each), // so 100pt accumulates after scrolling roughly one screenful.