mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Reverting to TableView but with SwiftUI compatibility (#1407)
* revert but also allows us to keep the existing SwiftUI implementation if we need it * code improvement * pr review * FF is volatile * message that communicates that is volatile
This commit is contained in:
@@ -61,6 +61,7 @@ enum RoomScreenViewAction {
|
||||
case cancelEdit
|
||||
/// Mark the entire room as read - this is heavy handed as a starting point for now.
|
||||
case markRoomAsRead
|
||||
case paginateBackwards
|
||||
|
||||
case timelineItemMenu(itemID: TimelineItemIdentifier)
|
||||
case timelineItemMenuAction(itemID: TimelineItemIdentifier, action: TimelineItemMenuAction)
|
||||
@@ -92,6 +93,7 @@ struct RoomScreenViewState: BindableState {
|
||||
var isEncryptedOneToOneRoom = false
|
||||
var timelineViewState = TimelineViewState() // check the doc before changing this
|
||||
var composerMode: RoomScreenComposerMode = .default
|
||||
var swiftUITimelineEnabled = false
|
||||
|
||||
var bindings: RoomScreenViewStateBindings
|
||||
|
||||
@@ -177,6 +179,10 @@ struct RoomMemberState {
|
||||
struct TimelineViewState {
|
||||
var canBackPaginate = true
|
||||
var isBackPaginating = false
|
||||
|
||||
// These can be removed when we have full swiftUI and moved as @State values in the view
|
||||
var scrollToBottomPublisher = PassthroughSubject<Void, Never>()
|
||||
|
||||
var itemsDictionary = OrderedDictionary<String, RoomTimelineItemViewState>()
|
||||
|
||||
var timelineIDs: [String] {
|
||||
@@ -186,6 +192,4 @@ struct TimelineViewState {
|
||||
var itemViewStates: [RoomTimelineItemViewState] {
|
||||
itemsDictionary.values.elements
|
||||
}
|
||||
|
||||
var paginateAction: (() -> Void)?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user