Skip to content

Commit

Permalink
Fix a bug where the pinned items banner could overlay the composer. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave authored Oct 24, 2024
1 parent f26159a commit 2b82959
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 2b82959

Please sign in to comment.