Flipping the tableView (#1366)

* I can't believe this works so well.

* code improvements

* we probably just need to change the TODO

* better naming

* done, there is only one small bug to fix

* fix

* this needs to be decided

* fixed the backpagination issue and improved the scroll to top gesture triggered by tapping on the clock (but won't work when I am at the bottom)

* fix
This commit is contained in:
Mauro
2023-07-20 13:29:45 +02:00
committed by GitHub
parent 5f8efefe19
commit f0ca15290f
2 changed files with 33 additions and 174 deletions
@@ -277,11 +277,7 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
let timelineItem = buildTimelineItem(for: itemProxy, chunkIndex: reversedIndex)
if timelineItem is PaginationIndicatorRoomTimelineItem {
isBackPaginating = true
} else if timelineItem is TimelineStartRoomTimelineItem {
canBackPaginate = false
} else if timelineItem is EncryptedHistoryRoomTimelineItem {
if timelineItem is EncryptedHistoryRoomTimelineItem {
canBackPaginate = false
}
@@ -319,8 +315,10 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
case .timelineStartReached:
let timelineStart = TimelineStartRoomTimelineItem(name: roomProxy.displayName ?? roomProxy.name)
newTimelineItems.insert(timelineStart, at: 0)
canBackPaginate = false
case .paginating:
newTimelineItems.insert(PaginationIndicatorRoomTimelineItem(), at: 0)
isBackPaginating = true
case .idle:
break
}