Hide/Show pin banner based on scroll direction (#3080)

This commit is contained in:
Mauro
2024-07-24 12:15:36 +02:00
committed by GitHub
parent 013240e9b1
commit 37786b8fad
9 changed files with 106 additions and 30 deletions
@@ -194,6 +194,13 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
didScrollToFocussedItem()
case .hasSwitchedTimeline:
Task { state.timelineViewState.isSwitchingTimelines = false }
case let .hasScrolled(direction):
state.lastScrollDirection = direction
case .nextPin:
state.currentPinIndex = (state.currentPinIndex + 1) % state.pinnedItems.count
case .viewAllPins:
// TODO: Implement
break
}
}