Configure UI to be in compatibility mode

This temporarily addresses iOS 26 UI issues by setting a UI
configuration called "compatibility mode" until we implement full iOS 26
support.

See https://developer.apple.com/documentation/BundleResources/Information-Property-List/UIDesignRequiresCompatibility

Furthermore, it addresses one remaining UI issue with the timeline top
padding by altering the padding calculation for iOS 26 targets.

Changelog-None
Closes: https://github.com/damus-io/damus/issues/3283
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-10-22 17:17:36 -07:00
parent 8122a8a580
commit 02296d7752
2 changed files with 12 additions and 1 deletions

View File

@@ -50,6 +50,15 @@ struct TimelineView<Content: View>: View {
MainContent
}
var topPadding: CGFloat {
if #available(iOS 26.0, *) {
headerHeight
}
else {
headerHeight - getSafeAreaTop()
}
}
var MainContent: some View {
ScrollViewReader { scroller in
ScrollView {
@@ -65,7 +74,7 @@ struct TimelineView<Content: View>: View {
.redacted(reason: loading ? .placeholder : [])
.shimmer(loading)
.disabled(loading)
.padding(.top, headerHeight - getSafeAreaTop())
.padding(.top, topPadding)
.offsetY { previous, current in
if previous > current{
if direction != .up && current < 0 {

View File

@@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDesignRequiresCompatibility</key>
<true/>
<key>NSUserActivityTypes</key>
<array>
<string>INSendMessageIntent</string>