Fix navigation issue when sharing text to multiple rooms

This commit is contained in:
Benoit Marty 2020-02-17 14:57:41 +01:00
parent a3b205b310
commit 48a033b3bd
2 changed files with 5 additions and 3 deletions

View File

@ -309,8 +309,8 @@ class RoomDetailFragment @Inject constructor(
// open share edition
onContentAttachmentsReady(sharedData.attachmentData)
}
null -> Timber.v("No share data to process")
}
null -> Timber.v("No share data to process")
}.exhaustive
}
}

View File

@ -122,11 +122,13 @@ class IncomingShareViewModel @AssistedInject constructor(
val room = session.getRoom(roomId)
room?.sendTextMessage(sharedData.text)
}
// This is it, pass the first roomId to let the screen open it
_viewEvents.post(IncomingShareViewEvents.MultipleRoomsShareDone(state.selectedRoomIds.first()))
}
is SharedData.Attachments -> {
shareAttachments(sharedData.attachmentData, state.selectedRoomIds, proposeMediaEdition = true, compressMediaBeforeSending = false)
}
}
}.exhaustive
}
}