mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Fix scrambled screen when searchinfg (#2191)
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
+14
-6
@@ -28,13 +28,15 @@ struct MessageForwardingScreen: View {
|
||||
}
|
||||
// Replace these with ScrollView's `scrollPosition` when dropping iOS 16.
|
||||
} header: {
|
||||
Rectangle().hidden().onAppear {
|
||||
context.send(viewAction: .reachedTop)
|
||||
}
|
||||
emptyRectangle
|
||||
.onAppear {
|
||||
context.send(viewAction: .reachedTop)
|
||||
}
|
||||
} footer: {
|
||||
Rectangle().hidden().onAppear {
|
||||
context.send(viewAction: .reachedBottom)
|
||||
}
|
||||
emptyRectangle
|
||||
.onAppear {
|
||||
context.send(viewAction: .reachedBottom)
|
||||
}
|
||||
}
|
||||
.compoundFormSection()
|
||||
}
|
||||
@@ -59,6 +61,12 @@ struct MessageForwardingScreen: View {
|
||||
.compoundSearchField()
|
||||
.disableAutocorrection(true)
|
||||
}
|
||||
|
||||
/// The greedy size of Rectangle can create an issue with the navigation bar when the search is highlighted, so is best to use a fixed frame instead of hidden() or EmptyView()
|
||||
private var emptyRectangle: some View {
|
||||
Rectangle()
|
||||
.frame(width: 0, height: 0)
|
||||
}
|
||||
}
|
||||
|
||||
private struct MessageForwardingRoomCell: View {
|
||||
|
||||
Reference in New Issue
Block a user