From 013a7322d29ac46f1ac5abf615b60b8b698f2d5c Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Fri, 25 Mar 2022 20:02:40 +0000 Subject: [PATCH] ios: fix chat scrolling crashing the app (#472) --- apps/ios/Shared/Views/Helpers/DetermineWidth.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/ios/Shared/Views/Helpers/DetermineWidth.swift b/apps/ios/Shared/Views/Helpers/DetermineWidth.swift index ba6577a9b0..d2a0aaab1d 100644 --- a/apps/ios/Shared/Views/Helpers/DetermineWidth.swift +++ b/apps/ios/Shared/Views/Helpers/DetermineWidth.swift @@ -11,12 +11,12 @@ import SwiftUI struct DetermineWidth: View { typealias Key = MaximumWidthPreferenceKey var body: some View { - GeometryReader { - proxy in + GeometryReader { proxy in Color.clear - .anchorPreference(key: Key.self, value: .bounds) { - anchor in proxy[anchor].size.width - } + .preference( + key: MaximumWidthPreferenceKey.self, + value: proxy.size.width + ) } } }