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:
@@ -50,6 +50,15 @@ struct TimelineView<Content: View>: View {
|
|||||||
MainContent
|
MainContent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var topPadding: CGFloat {
|
||||||
|
if #available(iOS 26.0, *) {
|
||||||
|
headerHeight
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
headerHeight - getSafeAreaTop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var MainContent: some View {
|
var MainContent: some View {
|
||||||
ScrollViewReader { scroller in
|
ScrollViewReader { scroller in
|
||||||
ScrollView {
|
ScrollView {
|
||||||
@@ -65,7 +74,7 @@ struct TimelineView<Content: View>: View {
|
|||||||
.redacted(reason: loading ? .placeholder : [])
|
.redacted(reason: loading ? .placeholder : [])
|
||||||
.shimmer(loading)
|
.shimmer(loading)
|
||||||
.disabled(loading)
|
.disabled(loading)
|
||||||
.padding(.top, headerHeight - getSafeAreaTop())
|
.padding(.top, topPadding)
|
||||||
.offsetY { previous, current in
|
.offsetY { previous, current in
|
||||||
if previous > current{
|
if previous > current{
|
||||||
if direction != .up && current < 0 {
|
if direction != .up && current < 0 {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>UIDesignRequiresCompatibility</key>
|
||||||
|
<true/>
|
||||||
<key>NSUserActivityTypes</key>
|
<key>NSUserActivityTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>INSendMessageIntent</string>
|
<string>INSendMessageIntent</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user