Skip to content

Commit

Permalink
fix: Delete after sync does'nt work
Browse files Browse the repository at this point in the history
  • Loading branch information
sirambd committed Oct 18, 2023
1 parent 5ca2921 commit bc379e7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ class UploadWorker(appContext: Context, params: WorkerParameters) : CoroutineWor
return contentResolver.query(uri, arrayOf(OpenableColumns.SIZE), null, null, null)?.use { cursor ->
if (cursor.moveToFirst()) startUploadFile(uri.getFileSize(cursor)) else false
}.also { isUploaded ->
if (isUploaded == true) deleteIfExists(keepFile = isSync())
if (isUploaded == true && UploadFile.getAppSyncSettings()?.deleteAfterSync != true) {
deleteIfExists(keepFile = isSync())
}
} ?: false
}

Expand Down

0 comments on commit bc379e7

Please sign in to comment.