mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Remove unused SwiftUI timeline version
This commit is contained in:
committed by
Stefan Ceriu
parent
31ca8ed7f2
commit
d6b7212b5a
@@ -88,35 +88,18 @@ struct RoomScreen: View {
|
||||
context.send(viewAction: .cancelSend(itemID: info.itemID))
|
||||
}
|
||||
}
|
||||
.onChange(of: context.isScrolledToBottom) { isScrolledToBottom in
|
||||
if isScrolledToBottom {
|
||||
context.send(viewAction: .scrolledToBottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var timeline: some View {
|
||||
timelineSwitch
|
||||
UITimelineView()
|
||||
.id(context.viewState.roomID)
|
||||
.environmentObject(context)
|
||||
.environment(\.timelineStyle, context.viewState.timelineStyle)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var timelineSwitch: some View {
|
||||
if context.viewState.swiftUITimelineEnabled {
|
||||
TimelineView(viewState: context.viewState.timelineViewState,
|
||||
isScrolledToBottom: $context.isScrolledToBottom) {
|
||||
context.send(viewAction: .paginateBackwards)
|
||||
.overlay(alignment: .bottomTrailing) {
|
||||
scrollToBottomButton
|
||||
}
|
||||
} else {
|
||||
UITimelineView()
|
||||
.overlay(alignment: .bottomTrailing) {
|
||||
scrollToBottomButton
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private var scrollToBottomButton: some View {
|
||||
Button { context.viewState.timelineViewState.scrollToBottomPublisher.send(()) } label: {
|
||||
Image(systemName: "chevron.down")
|
||||
|
||||
Reference in New Issue
Block a user