Skip to content

Commit

Permalink
trigger worker via mFilesForDirectDownload
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Oct 29, 2024
1 parent 108dbeb commit 6a8ca4d
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.util.Map;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

Expand Down Expand Up @@ -129,7 +130,6 @@ protected RemoteOperationResult run(OwnCloudClient client) {
if (result.isSuccess()) {
if (mRemoteFolderChanged) {
result = fetchAndSyncRemoteFolder(client);

} else {
prepareOpsFromLocalKnowledge();
}
Expand Down Expand Up @@ -419,7 +419,6 @@ private void prepareOpsFromLocalKnowledge() throws OperationCancelledException {
if (!child.isFolder()) {
if (!child.isDown()) {
mFilesForDirectDownload.add(child);

} else {
/// this should result in direct upload of files that were locally modified
SynchronizeFileOperation operation = new SynchronizeFileOperation(
Expand All @@ -431,7 +430,6 @@ private void prepareOpsFromLocalKnowledge() throws OperationCancelledException {
getStorageManager()
);
mFilesToSyncContents.add(operation);

}
}
}
Expand All @@ -442,9 +440,8 @@ private void syncContents() throws OperationCancelledException {
startContentSynchronizations(mFilesToSyncContents);
}


private void startDirectDownloads() {
FileDownloadHelper.Companion.instance().downloadFile(user, mLocalFolder);
mFilesForDirectDownload.forEach(file -> FileDownloadHelper.Companion.instance().downloadFile(user, file));
}

/**
Expand Down

0 comments on commit 6a8ca4d

Please sign in to comment.