Javadoc for NoMerger
This commit is contained in:
parent
f910cd6f97
commit
4deb7eb865
|
@ -278,7 +278,7 @@ internal class DefaultSendService @Inject constructor(private val context: Conte
|
|||
return "${roomId}_$identifier"
|
||||
}
|
||||
|
||||
private fun createEncryptEventWork(event: Event, startChain: Boolean = false): OneTimeWorkRequest {
|
||||
private fun createEncryptEventWork(event: Event, startChain: Boolean): OneTimeWorkRequest {
|
||||
// Same parameter
|
||||
val params = EncryptEventWorker.Params(credentials.userId, roomId, event)
|
||||
val sendWorkData = WorkerParamsFactory.toData(params)
|
||||
|
@ -314,7 +314,7 @@ internal class DefaultSendService @Inject constructor(private val context: Conte
|
|||
private fun createUploadMediaWork(event: Event,
|
||||
attachment: ContentAttachmentData,
|
||||
isRoomEncrypted: Boolean,
|
||||
startChain: Boolean = false): OneTimeWorkRequest {
|
||||
startChain: Boolean): OneTimeWorkRequest {
|
||||
val uploadMediaWorkerParams = UploadContentWorker.Params(credentials.userId, roomId, event, attachment, isRoomEncrypted)
|
||||
val uploadWorkData = WorkerParamsFactory.toData(uploadMediaWorkerParams)
|
||||
|
||||
|
|
|
@ -18,7 +18,10 @@ package im.vector.matrix.android.internal.session.room.send
|
|||
import androidx.work.Data
|
||||
import androidx.work.InputMerger
|
||||
|
||||
class NoMerger : InputMerger() {
|
||||
/**
|
||||
* InputMerger which takes only the first input, to ensure an appended work with only have the specified parameters
|
||||
*/
|
||||
internal class NoMerger : InputMerger() {
|
||||
override fun merge(inputs: MutableList<Data>): Data {
|
||||
return inputs.first()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue