mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
isUploadingNow for uploads after file conflict resolved
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
This commit is contained in:
parent
1d2a7c9d53
commit
ad34893419
1 changed files with 12 additions and 5 deletions
|
@ -1266,16 +1266,23 @@ public class FileUploader extends Service
|
||||||
if (useFilesUploadWorker(getApplicationContext())){
|
if (useFilesUploadWorker(getApplicationContext())){
|
||||||
UploadFileOperation currentUploadFileOperation = FilesUploadWorker.Companion.getCurrentUploadFileOperation();
|
UploadFileOperation currentUploadFileOperation = FilesUploadWorker.Companion.getCurrentUploadFileOperation();
|
||||||
if (currentUploadFileOperation == null || currentUploadFileOperation.getUser() == null) return false;
|
if (currentUploadFileOperation == null || currentUploadFileOperation.getUser() == null) return false;
|
||||||
return upload != null &&
|
if (upload == null || (!upload.getAccountName().equals(currentUploadFileOperation.getUser().getAccountName()))) return false;
|
||||||
currentUploadFileOperation.getUser().getAccountName() != null &&
|
if (currentUploadFileOperation.getOldFile() != null){
|
||||||
upload.getAccountName().equals(currentUploadFileOperation.getUser().getAccountName()) &&
|
// For file conflicts check old file remote path
|
||||||
upload.getRemotePath().equals(currentUploadFileOperation.getRemotePath());
|
return upload.getRemotePath().equals(currentUploadFileOperation.getRemotePath()) ||
|
||||||
|
upload.getRemotePath().equals(currentUploadFileOperation.getOldFile().getRemotePath());
|
||||||
|
}
|
||||||
|
return upload.getRemotePath().equals(currentUploadFileOperation.getRemotePath());
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
|
|
||||||
return upload != null &&
|
return upload != null &&
|
||||||
mCurrentAccount != null &&
|
mCurrentAccount != null &&
|
||||||
mCurrentUpload != null &&
|
mCurrentUpload != null &&
|
||||||
upload.getAccountName().equals(mCurrentAccount.name) &&
|
upload.getAccountName().equals(mCurrentAccount.name) &&
|
||||||
upload.getRemotePath().equals(mCurrentUpload.getRemotePath());
|
(upload.getRemotePath().equals(mCurrentUpload.getRemotePath()) ||
|
||||||
|
(mCurrentUpload.getOldFile() != null &&
|
||||||
|
upload.getRemotePath().equals(mCurrentUpload.getOldFile().getRemotePath())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue