mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +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())){
|
||||
UploadFileOperation currentUploadFileOperation = FilesUploadWorker.Companion.getCurrentUploadFileOperation();
|
||||
if (currentUploadFileOperation == null || currentUploadFileOperation.getUser() == null) return false;
|
||||
return upload != null &&
|
||||
currentUploadFileOperation.getUser().getAccountName() != null &&
|
||||
upload.getAccountName().equals(currentUploadFileOperation.getUser().getAccountName()) &&
|
||||
upload.getRemotePath().equals(currentUploadFileOperation.getRemotePath());
|
||||
if (upload == null || (!upload.getAccountName().equals(currentUploadFileOperation.getUser().getAccountName()))) return false;
|
||||
if (currentUploadFileOperation.getOldFile() != null){
|
||||
// For file conflicts check old file remote path
|
||||
return upload.getRemotePath().equals(currentUploadFileOperation.getRemotePath()) ||
|
||||
upload.getRemotePath().equals(currentUploadFileOperation.getOldFile().getRemotePath());
|
||||
}
|
||||
return upload.getRemotePath().equals(currentUploadFileOperation.getRemotePath());
|
||||
|
||||
}else {
|
||||
|
||||
return upload != null &&
|
||||
mCurrentAccount != null &&
|
||||
mCurrentUpload != null &&
|
||||
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