mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Fixes vector-im/element-x-ios/issues/114 - Replying to timeline items
This commit is contained in:
@@ -24,6 +24,12 @@ enum TimelineItemContextMenuAction: Hashable {
|
||||
case quote
|
||||
case copyPermalink
|
||||
case redact
|
||||
case reply
|
||||
}
|
||||
|
||||
enum RoomScreenComposerMode: Equatable {
|
||||
case `default`
|
||||
case reply(id: String, displayName: String)
|
||||
}
|
||||
|
||||
enum RoomScreenViewAction {
|
||||
@@ -33,6 +39,7 @@ enum RoomScreenViewAction {
|
||||
case linkClicked(url: URL)
|
||||
case sendMessage
|
||||
case sendReaction(key: String, eventID: String)
|
||||
case cancelReply
|
||||
}
|
||||
|
||||
struct RoomScreenViewState: BindableState {
|
||||
@@ -45,6 +52,9 @@ struct RoomScreenViewState: BindableState {
|
||||
|
||||
var contextMenuBuilder: (@MainActor (_ itemId: String) -> TimelineItemContextMenu)?
|
||||
|
||||
var composerMode: RoomScreenComposerMode = .default
|
||||
|
||||
var messageComposerDisabled = false // Remove this when we have local echoes
|
||||
var sendButtonDisabled: Bool {
|
||||
bindings.composerText.count == 0
|
||||
}
|
||||
@@ -52,6 +62,7 @@ struct RoomScreenViewState: BindableState {
|
||||
|
||||
struct RoomScreenViewStateBindings {
|
||||
var composerText: String
|
||||
var composerFocused: Bool
|
||||
|
||||
/// Information describing the currently displayed alert.
|
||||
var alertInfo: AlertInfo<RoomScreenErrorType>?
|
||||
|
||||
Reference in New Issue
Block a user