diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/content/UploadContentWorker.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/content/UploadContentWorker.kt index 90d15cc3b2..5a8688ee6a 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/content/UploadContentWorker.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/content/UploadContentWorker.kt @@ -48,7 +48,7 @@ internal class UploadContentWorker(context: Context, params: WorkerParameters) : val event: Event, val attachment: ContentAttachmentData, val isRoomEncrypted: Boolean, - override var lastFailureMessage: String? = null + override val lastFailureMessage: String? = null ) : SessionWorkerParams @Inject lateinit var fileUploader: FileUploader diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/group/GetGroupDataWorker.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/group/GetGroupDataWorker.kt index a619b83a4d..081739cbbb 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/group/GetGroupDataWorker.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/group/GetGroupDataWorker.kt @@ -32,7 +32,7 @@ internal class GetGroupDataWorker(context: Context, params: WorkerParameters) : internal data class Params( override val userId: String, val groupIds: List, - override var lastFailureMessage: String? = null + override val lastFailureMessage: String? = null ) : SessionWorkerParams @Inject lateinit var getGroupDataTask: GetGroupDataTask diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/relation/SendRelationWorker.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/relation/SendRelationWorker.kt index a04c7b3ed6..81a888eea4 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/relation/SendRelationWorker.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/relation/SendRelationWorker.kt @@ -40,7 +40,7 @@ internal class SendRelationWorker(context: Context, params: WorkerParameters) : val roomId: String, val event: Event, val relationType: String? = null, - override var lastFailureMessage: String? + override val lastFailureMessage: String? ) : SessionWorkerParams @Inject lateinit var roomAPI: RoomAPI diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/EncryptEventWorker.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/EncryptEventWorker.kt index 44046a1dea..118fa7ccb5 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/EncryptEventWorker.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/EncryptEventWorker.kt @@ -42,7 +42,7 @@ internal class EncryptEventWorker(context: Context, params: WorkerParameters) val event: Event, /**Do not encrypt these keys, keep them as is in encrypted content (e.g. m.relates_to)*/ val keepKeys: List? = null, - override var lastFailureMessage: String? = null + override val lastFailureMessage: String? = null ) : SessionWorkerParams @Inject lateinit var crypto: CryptoService diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/RedactEventWorker.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/RedactEventWorker.kt index 38e0e23b6e..5acc16e19e 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/RedactEventWorker.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/RedactEventWorker.kt @@ -36,7 +36,7 @@ internal class RedactEventWorker(context: Context, params: WorkerParameters) : C val roomId: String, val eventId: String, val reason: String?, - override var lastFailureMessage: String? = null + override val lastFailureMessage: String? = null ) : SessionWorkerParams @Inject lateinit var roomAPI: RoomAPI diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/SendEventWorker.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/SendEventWorker.kt index 315ea4574d..05cd56e38f 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/SendEventWorker.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/SendEventWorker.kt @@ -39,7 +39,7 @@ internal class SendEventWorker constructor(context: Context, params: WorkerParam override val userId: String, val roomId: String, val event: Event, - override var lastFailureMessage: String? = null + override val lastFailureMessage: String? = null ) : SessionWorkerParams @Inject lateinit var localEchoUpdater: LocalEchoUpdater diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/worker/SessionWorkerParams.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/worker/SessionWorkerParams.kt index 99fe3142dc..0c53a3ef0b 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/worker/SessionWorkerParams.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/worker/SessionWorkerParams.kt @@ -20,5 +20,5 @@ interface SessionWorkerParams { 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 - var lastFailureMessage: String? + val lastFailureMessage: String? }