mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
implemented the UI to render the formatted floating date
This commit is contained in:
@@ -33,9 +33,11 @@ struct RoomScreen: View {
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomScreen.scrollToBottom)
|
||||
}
|
||||
.background(Color.compound.bgCanvasDefault.ignoresSafeArea())
|
||||
.topBanner(pinnedItemsBanner, isVisible: context.viewState.shouldShowPinnedEventsBanner && !isVoiceOverEnabled)
|
||||
// This can overlay on top of the pinnedItemsBanner
|
||||
.topBanner(knockRequestsBanner, isVisible: context.viewState.shouldSeeKnockRequests)
|
||||
.topBanners([
|
||||
TopBannerItem(pinnedItemsBanner, isVisible: context.viewState.shouldShowPinnedEventsBanner && !isVoiceOverEnabled),
|
||||
// This can overlay on top of the pinnedItemsBanner
|
||||
TopBannerItem(knockRequestsBanner, isVisible: context.viewState.shouldSeeKnockRequests)
|
||||
], footer: dateBadge)
|
||||
.safeAreaInset(edge: .top) {
|
||||
// When VoiceOver is enabled, the table view isn't reversed and the scroll gestures
|
||||
// don't trigger meaning the banner never hides itself and so the .overlay layout
|
||||
@@ -88,6 +90,13 @@ struct RoomScreen: View {
|
||||
.padding(.top, 16)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var dateBadge: some View {
|
||||
if timelineContext.viewState.floatingTimelineDateEnabled, !isVoiceOverEnabled {
|
||||
FloatingDateBadge(dateText: timelineContext.floatingDateText)
|
||||
}
|
||||
}
|
||||
|
||||
private func dismissKnockRequestsBanner() {
|
||||
context.send(viewAction: .dismissKnockRequests)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user