add todos

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-11-29 16:54:03 +01:00 committed by Alper Öztürk
parent 722ef51860
commit a8bff664bb

View file

@ -29,6 +29,7 @@ class SyncWorker(
@Suppress("DEPRECATION")
override suspend fun doWork(): Result {
// TODO add notifications
Log_OC.d(TAG, "SyncWorker started")
val filePaths = inputData.getStringArray(FILE_PATHS)
@ -44,6 +45,7 @@ class SyncWorker(
var result = true
filePaths.forEach { path ->
fileDataStorageManager.getFileByDecryptedRemotePath(path)?.let { file ->
// TODO dont download downloaded files??
val operation = DownloadFileOperation(user, file, context).execute(client)
Log_OC.d(TAG, "Syncing file: " + file.decryptedRemotePath)
if (!operation.isSuccess) {
@ -52,6 +54,9 @@ class SyncWorker(
}
}
// TODO add isDownloading
// TODO add cancel only one file download
return if (result) {
Log_OC.d(TAG, "SyncWorker completed")
Result.success()