mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
RoomScreenViewModel refactor part 2 (#3169)
This commit is contained in:
@@ -20,14 +20,21 @@ import OrderedCollections
|
||||
enum RoomScreenViewModelAction {
|
||||
case focusEvent(eventID: String)
|
||||
case displayPinnedEventsTimeline
|
||||
case displayRoomDetails
|
||||
case displayCall
|
||||
}
|
||||
|
||||
enum RoomScreenViewAction {
|
||||
case tappedPinnedEventsBanner
|
||||
case viewAllPins
|
||||
case displayRoomDetails
|
||||
case displayCall
|
||||
}
|
||||
|
||||
struct RoomScreenViewState: BindableState {
|
||||
var roomTitle = ""
|
||||
var roomAvatar: RoomAvatar
|
||||
|
||||
var lastScrollDirection: ScrollDirection?
|
||||
var isPinningEnabled = false
|
||||
// This is used to control the banner
|
||||
@@ -36,6 +43,9 @@ struct RoomScreenViewState: BindableState {
|
||||
isPinningEnabled && !pinnedEventsBannerState.isEmpty && lastScrollDirection != .top
|
||||
}
|
||||
|
||||
var canJoinCall = false
|
||||
var hasOngoingCall: Bool
|
||||
|
||||
var bindings: RoomScreenViewStateBindings
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user