Loading app/src/main/java/foundation/e/drive/services/SynchronizationService.java +4 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ public class SynchronizationService extends Service implements OnRemoteOperation */ public void queueSyncRequest(SyncRequest request) { for (SyncWrapper syncWrapper : startedSync.values()) { if (syncWrapper.equals(request)) { if (syncWrapper.isRunning() && syncWrapper.equals(request)) { return; } } Loading @@ -128,8 +128,10 @@ public class SynchronizationService extends Service implements OnRemoteOperation */ public void queueSyncRequests(Collection<SyncRequest> requests) { for (SyncWrapper syncWrapper : startedSync.values()) { if (syncWrapper.isRunning()) { requests.removeIf(syncRequest -> syncWrapper.equals(syncRequest)); } } final SharedPreferences prefs = getSharedPreferences(FAILED_TRANSFER_PREF, Context.MODE_PRIVATE); requests.removeIf(syncRequest -> prefs.getInt(syncRequest.getSyncedFileState().getLocalPath(), 0) >= FAILURE_LIMIT); Loading Loading
app/src/main/java/foundation/e/drive/services/SynchronizationService.java +4 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ public class SynchronizationService extends Service implements OnRemoteOperation */ public void queueSyncRequest(SyncRequest request) { for (SyncWrapper syncWrapper : startedSync.values()) { if (syncWrapper.equals(request)) { if (syncWrapper.isRunning() && syncWrapper.equals(request)) { return; } } Loading @@ -128,8 +128,10 @@ public class SynchronizationService extends Service implements OnRemoteOperation */ public void queueSyncRequests(Collection<SyncRequest> requests) { for (SyncWrapper syncWrapper : startedSync.values()) { if (syncWrapper.isRunning()) { requests.removeIf(syncRequest -> syncWrapper.equals(syncRequest)); } } final SharedPreferences prefs = getSharedPreferences(FAILED_TRANSFER_PREF, Context.MODE_PRIVATE); requests.removeIf(syncRequest -> prefs.getInt(syncRequest.getSyncedFileState().getLocalPath(), 0) >= FAILURE_LIMIT); Loading