mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Move message forwarding out of the flow coordinator. (#2738)
This commit is contained in:
+20
-1
@@ -15,10 +15,11 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import MatrixRustSDK
|
||||
|
||||
enum MessageForwardingScreenViewModelAction {
|
||||
case dismiss
|
||||
case send(roomID: String)
|
||||
case sent(roomID: String)
|
||||
}
|
||||
|
||||
struct MessageForwardingScreenViewState: BindableState {
|
||||
@@ -45,3 +46,21 @@ struct MessageForwardingRoom: Identifiable, Equatable {
|
||||
let alias: String?
|
||||
let avatarURL: URL?
|
||||
}
|
||||
|
||||
struct MessageForwardingItem: Hashable {
|
||||
/// The source item's timeline ID. Only necessary for a rough Hashable conformance.
|
||||
let id: TimelineItemIdentifier
|
||||
/// The source item's room ID.
|
||||
let roomID: String
|
||||
/// The item's content to be forwarded.
|
||||
let content: RoomMessageEventContentWithoutRelation
|
||||
|
||||
static func == (lhs: MessageForwardingItem, rhs: MessageForwardingItem) -> Bool {
|
||||
lhs.id == rhs.id && lhs.roomID == rhs.roomID
|
||||
}
|
||||
|
||||
func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(id)
|
||||
hasher.combine(roomID)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user