mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Merge pull request #13897 from nextcloud/bugfix/unnecessary-sync
BugFix - Unnecessary Sync
This commit is contained in:
commit
2e03e22497
1 changed files with 2 additions and 5 deletions
|
@ -40,6 +40,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||||
|
|
||||||
|
@ -129,7 +130,6 @@ public class SynchronizeFolderOperation extends SyncOperation {
|
||||||
if (result.isSuccess()) {
|
if (result.isSuccess()) {
|
||||||
if (mRemoteFolderChanged) {
|
if (mRemoteFolderChanged) {
|
||||||
result = fetchAndSyncRemoteFolder(client);
|
result = fetchAndSyncRemoteFolder(client);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
prepareOpsFromLocalKnowledge();
|
prepareOpsFromLocalKnowledge();
|
||||||
}
|
}
|
||||||
|
@ -419,7 +419,6 @@ public class SynchronizeFolderOperation extends SyncOperation {
|
||||||
if (!child.isFolder()) {
|
if (!child.isFolder()) {
|
||||||
if (!child.isDown()) {
|
if (!child.isDown()) {
|
||||||
mFilesForDirectDownload.add(child);
|
mFilesForDirectDownload.add(child);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/// this should result in direct upload of files that were locally modified
|
/// this should result in direct upload of files that were locally modified
|
||||||
SynchronizeFileOperation operation = new SynchronizeFileOperation(
|
SynchronizeFileOperation operation = new SynchronizeFileOperation(
|
||||||
|
@ -431,7 +430,6 @@ public class SynchronizeFolderOperation extends SyncOperation {
|
||||||
getStorageManager()
|
getStorageManager()
|
||||||
);
|
);
|
||||||
mFilesToSyncContents.add(operation);
|
mFilesToSyncContents.add(operation);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -442,9 +440,8 @@ public class SynchronizeFolderOperation extends SyncOperation {
|
||||||
startContentSynchronizations(mFilesToSyncContents);
|
startContentSynchronizations(mFilesToSyncContents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void startDirectDownloads() {
|
private void startDirectDownloads() {
|
||||||
FileDownloadHelper.Companion.instance().downloadFile(user, mLocalFolder);
|
mFilesForDirectDownload.forEach(file -> FileDownloadHelper.Companion.instance().downloadFile(user, file));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue