mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Allow the user to forward the same message to multiple rooms at once
This will send the item to the rooms in order they were chosen and only deep link into the target room if single, otherwise it will just dismiss the forwarding screen after sending.
This commit is contained in:
@@ -37,7 +37,7 @@ struct MessageForwardingScreenViewModelTests {
|
||||
@Test
|
||||
mutating func roomSelection() {
|
||||
context.send(viewAction: .selectRoom(roomID: "2"))
|
||||
#expect(context.viewState.selectedRoomID == "2")
|
||||
#expect(context.viewState.selectedRoomIDs == ["2"])
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -54,12 +54,12 @@ struct MessageForwardingScreenViewModelTests {
|
||||
@Test
|
||||
mutating func forwarding() async throws {
|
||||
context.send(viewAction: .selectRoom(roomID: "2"))
|
||||
#expect(context.viewState.selectedRoomID == "2")
|
||||
#expect(context.viewState.selectedRoomIDs == ["2"])
|
||||
|
||||
let deferred = deferFulfillment(viewModel.actions) { action in
|
||||
switch action {
|
||||
case .sent(let roomID):
|
||||
return roomID == "2"
|
||||
case .sent(let roomIDs):
|
||||
return roomIDs == ["2"]
|
||||
default:
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user