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"
|
return "${roomId}_$identifier"
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createEncryptEventWork(event: Event, startChain: Boolean = false): OneTimeWorkRequest {
|
private fun createEncryptEventWork(event: Event, startChain: Boolean): OneTimeWorkRequest {
|
||||||
// Same parameter
|
// Same parameter
|
||||||
val params = EncryptEventWorker.Params(credentials.userId, roomId, event)
|
val params = EncryptEventWorker.Params(credentials.userId, roomId, event)
|
||||||
val sendWorkData = WorkerParamsFactory.toData(params)
|
val sendWorkData = WorkerParamsFactory.toData(params)
|
||||||
|
@ -314,7 +314,7 @@ internal class DefaultSendService @Inject constructor(private val context: Conte
|
||||||
private fun createUploadMediaWork(event: Event,
|
private fun createUploadMediaWork(event: Event,
|
||||||
attachment: ContentAttachmentData,
|
attachment: ContentAttachmentData,
|
||||||
isRoomEncrypted: Boolean,
|
isRoomEncrypted: Boolean,
|
||||||
startChain: Boolean = false): OneTimeWorkRequest {
|
startChain: Boolean): OneTimeWorkRequest {
|
||||||
val uploadMediaWorkerParams = UploadContentWorker.Params(credentials.userId, roomId, event, attachment, isRoomEncrypted)
|
val uploadMediaWorkerParams = UploadContentWorker.Params(credentials.userId, roomId, event, attachment, isRoomEncrypted)
|
||||||
val uploadWorkData = WorkerParamsFactory.toData(uploadMediaWorkerParams)
|
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.Data
|
||||||
import androidx.work.InputMerger
|
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 {
|
override fun merge(inputs: MutableList<Data>): Data {
|
||||||
return inputs.first()
|
return inputs.first()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue