Fix a bug where the pinned items banner could overlay the composer. (#3441)

This commit is contained in:
Doug 2024-10-24 11:26:53 +01:00 committed by GitHub
parent f26159a295
commit 2b82959430
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,14 @@ struct RoomScreen: View {
var body: some View {
timeline
.background(Color.compound.bgCanvasDefault.ignoresSafeArea())
.overlay(alignment: .top) {
Group {
if roomContext.viewState.shouldShowPinnedEventsBanner {
pinnedItemsBanner
}
}
.animation(.elementDefault, value: roomContext.viewState.shouldShowPinnedEventsBanner)
}
.safeAreaInset(edge: .bottom, spacing: 0) {
VStack(spacing: 0) {
RoomScreenFooterView(details: roomContext.viewState.footerDetails,
@ -52,14 +60,6 @@ struct RoomScreen: View {
.environment(\.shouldAutomaticallyLoadImages, !timelineContext.viewState.hideTimelineMedia)
}
}
.overlay(alignment: .top) {
Group {
if roomContext.viewState.shouldShowPinnedEventsBanner {
pinnedItemsBanner
}
}
.animation(.elementDefault, value: roomContext.viewState.shouldShowPinnedEventsBanner)
}
.navigationTitle(L10n.screenRoomTitle) // Hidden but used for back button text.
.navigationBarTitleDisplayMode(.inline)
.navigationBarHidden(isNavigationBarHidden)