commit 967785392fb948422f846f4831f9b223c7132847
parent 9e6fbeefcdb3a83167f9bc9851446007b34039e1
Author: cr0bar <cr0bar@cr0.bar>
Date: Sun, 6 Aug 2023 14:21:25 -0700
note: fix paragraphs not appearing on iOS17
In some edge cases, the inflated UiTextView didn't render properly
causing a black screen which needed the user to scroll. Dropped the
inflate size and now only set where selectedTextHeight is .zero, seems
more reliable.
Closes: https://github.com/damus-io/damus/pull/1427
Changelog-Fixed: Fix paragraphs not appearing on iOS17
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/damus/Components/SelectableText.swift b/damus/Components/SelectableText.swift
@@ -28,7 +28,11 @@ struct SelectableText: View {
)
.padding([.leading, .trailing], -1.0)
.onAppear {
- self.selectedTextWidth = geo.size.width
+ if geo.size.width == .zero {
+ self.selectedTextHeight = 1000.0
+ } else {
+ self.selectedTextWidth = geo.size.width
+ }
}
.onChange(of: geo.size) { newSize in
self.selectedTextWidth = newSize.width