lastFailureMessage is val, not var

This commit is contained in:
Benoit Marty 2019-07-08 13:31:33 +02:00
parent e149ee53de
commit 829e8da8dc
7 changed files with 7 additions and 7 deletions

View File

@ -48,7 +48,7 @@ internal class UploadContentWorker(context: Context, params: WorkerParameters) :
val event: Event, val event: Event,
val attachment: ContentAttachmentData, val attachment: ContentAttachmentData,
val isRoomEncrypted: Boolean, val isRoomEncrypted: Boolean,
override var lastFailureMessage: String? = null override val lastFailureMessage: String? = null
) : SessionWorkerParams ) : SessionWorkerParams


@Inject lateinit var fileUploader: FileUploader @Inject lateinit var fileUploader: FileUploader

View File

@ -32,7 +32,7 @@ internal class GetGroupDataWorker(context: Context, params: WorkerParameters) :
internal data class Params( internal data class Params(
override val userId: String, override val userId: String,
val groupIds: List<String>, val groupIds: List<String>,
override var lastFailureMessage: String? = null override val lastFailureMessage: String? = null
) : SessionWorkerParams ) : SessionWorkerParams


@Inject lateinit var getGroupDataTask: GetGroupDataTask @Inject lateinit var getGroupDataTask: GetGroupDataTask

View File

@ -40,7 +40,7 @@ internal class SendRelationWorker(context: Context, params: WorkerParameters) :
val roomId: String, val roomId: String,
val event: Event, val event: Event,
val relationType: String? = null, val relationType: String? = null,
override var lastFailureMessage: String? override val lastFailureMessage: String?
) : SessionWorkerParams ) : SessionWorkerParams


@Inject lateinit var roomAPI: RoomAPI @Inject lateinit var roomAPI: RoomAPI

View File

@ -42,7 +42,7 @@ internal class EncryptEventWorker(context: Context, params: WorkerParameters)
val event: Event, val event: Event,
/**Do not encrypt these keys, keep them as is in encrypted content (e.g. m.relates_to)*/ /**Do not encrypt these keys, keep them as is in encrypted content (e.g. m.relates_to)*/
val keepKeys: List<String>? = null, val keepKeys: List<String>? = null,
override var lastFailureMessage: String? = null override val lastFailureMessage: String? = null
) : SessionWorkerParams ) : SessionWorkerParams


@Inject lateinit var crypto: CryptoService @Inject lateinit var crypto: CryptoService

View File

@ -36,7 +36,7 @@ internal class RedactEventWorker(context: Context, params: WorkerParameters) : C
val roomId: String, val roomId: String,
val eventId: String, val eventId: String,
val reason: String?, val reason: String?,
override var lastFailureMessage: String? = null override val lastFailureMessage: String? = null
) : SessionWorkerParams ) : SessionWorkerParams


@Inject lateinit var roomAPI: RoomAPI @Inject lateinit var roomAPI: RoomAPI

View File

@ -39,7 +39,7 @@ internal class SendEventWorker constructor(context: Context, params: WorkerParam
override val userId: String, override val userId: String,
val roomId: String, val roomId: String,
val event: Event, val event: Event,
override var lastFailureMessage: String? = null override val lastFailureMessage: String? = null
) : SessionWorkerParams ) : SessionWorkerParams


@Inject lateinit var localEchoUpdater: LocalEchoUpdater @Inject lateinit var localEchoUpdater: LocalEchoUpdater

View File

@ -20,5 +20,5 @@ interface SessionWorkerParams {
val userId: String val userId: String


// Null is no error occurs. When chaining Workers, first step is to check that there is no lastFailureMessage from the previous workers // Null is no error occurs. When chaining Workers, first step is to check that there is no lastFailureMessage from the previous workers
var lastFailureMessage: String? val lastFailureMessage: String?
} }