mirror of
https://github.com/nextcloud/android.git
synced 2024-12-19 07:22:06 +03:00
add todos
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
722ef51860
commit
a8bff664bb
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,7 @@ class SyncWorker(
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
override suspend fun doWork(): Result {
|
override suspend fun doWork(): Result {
|
||||||
|
// TODO add notifications
|
||||||
Log_OC.d(TAG, "SyncWorker started")
|
Log_OC.d(TAG, "SyncWorker started")
|
||||||
val filePaths = inputData.getStringArray(FILE_PATHS)
|
val filePaths = inputData.getStringArray(FILE_PATHS)
|
||||||
|
|
||||||
|
@ -44,6 +45,7 @@ class SyncWorker(
|
||||||
var result = true
|
var result = true
|
||||||
filePaths.forEach { path ->
|
filePaths.forEach { path ->
|
||||||
fileDataStorageManager.getFileByDecryptedRemotePath(path)?.let { file ->
|
fileDataStorageManager.getFileByDecryptedRemotePath(path)?.let { file ->
|
||||||
|
// TODO dont download downloaded files??
|
||||||
val operation = DownloadFileOperation(user, file, context).execute(client)
|
val operation = DownloadFileOperation(user, file, context).execute(client)
|
||||||
Log_OC.d(TAG, "Syncing file: " + file.decryptedRemotePath)
|
Log_OC.d(TAG, "Syncing file: " + file.decryptedRemotePath)
|
||||||
if (!operation.isSuccess) {
|
if (!operation.isSuccess) {
|
||||||
|
@ -52,6 +54,9 @@ class SyncWorker(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO add isDownloading
|
||||||
|
// TODO add cancel only one file download
|
||||||
|
|
||||||
return if (result) {
|
return if (result) {
|
||||||
Log_OC.d(TAG, "SyncWorker completed")
|
Log_OC.d(TAG, "SyncWorker completed")
|
||||||
Result.success()
|
Result.success()
|
||||||
|
|
Loading…
Reference in a new issue