From bbaf9b9555fd15884c7d93b7fc90311de8c5a77e Mon Sep 17 00:00:00 2001 From: Gino Miceli Date: Thu, 14 Dec 2023 16:30:40 -0500 Subject: [PATCH] Fix detekt error --- .../ground/persistence/sync/LocalMutationSyncWorker.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ground/src/main/java/com/google/android/ground/persistence/sync/LocalMutationSyncWorker.kt b/ground/src/main/java/com/google/android/ground/persistence/sync/LocalMutationSyncWorker.kt index e0471afaa8..3250573516 100644 --- a/ground/src/main/java/com/google/android/ground/persistence/sync/LocalMutationSyncWorker.kt +++ b/ground/src/main/java/com/google/android/ground/persistence/sync/LocalMutationSyncWorker.kt @@ -61,8 +61,8 @@ constructor( override suspend fun doWork(): Result = withContext(Dispatchers.IO) { doWorkInternal() } - private suspend fun doWorkInternal(): Result { - return try { + private suspend fun doWorkInternal(): Result = + try { val mutations = getPendingOrEligibleFailedMutations() Timber.d("Syncing ${mutations.size} changes for LOI $locationOfInterestId") if (processMutations(mutations)) success() else retry() @@ -70,7 +70,6 @@ constructor( Timber.e(t, "Failed to sync changes for LOI $locationOfInterestId") retry() } - } /** * Attempts to fetch all mutations from the [MutationRepository] that are in `PENDING` state or in