ios: fix chat scrolling crashing the app (#472)

This commit is contained in:
Evgeny Poberezkin
2022-03-25 20:02:40 +00:00
committed by GitHub
parent 0b45ddfc79
commit 013a7322d2

View File

@@ -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
)
}
}
}