Merge pull request #12316 from nextcloud/missleading_error_toast_in_uploads_tab

Fix misleading toast in uploads tab
This commit is contained in:
Jonas Mayer 2023-12-21 18:56:44 +01:00 committed by GitHub
commit c612d7a2de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 11 deletions

View file

@ -196,19 +196,22 @@ public class UploadListActivity extends FileActivity {
private void refresh() {
backgroundJobManager.startImmediateFilesSyncJob(false, true);
// retry failed uploads
new Thread(() -> FileUploader.retryFailedUploads(
this,
uploadsStorageManager,
connectivityService,
userAccountManager,
powerManagementService))
.start();
if(uploadsStorageManager.getFailedUploads().length > 0){
// retry failed uploads
new Thread(() -> FileUploader.retryFailedUploads(
this,
uploadsStorageManager,
connectivityService,
userAccountManager,
powerManagementService))
.start();
DisplayUtils.showSnackMessage(this, R.string.uploader_local_files_uploaded);
}
// update UI
uploadListAdapter.loadUploadItemsFromDb();
swipeListRefreshLayout.setRefreshing(false);
DisplayUtils.showSnackMessage(this, R.string.uploader_local_files_uploaded);
}
@Override

View file

@ -151,7 +151,6 @@ class FilesUploadHelper {
val boundListener = mBoundListeners[key]
boundListener?.onTransferProgress(progressRate, totalTransferredSoFar, totalToTransfer, fileName)
Log_OC.d("TAG", "Hello")
}
}
}

View file

@ -916,7 +916,7 @@
<string name="failed_to_start_editor">Failed to start editor</string>
<string name="create_rich_workspace">Add folder info</string>
<string name="creates_rich_workspace">creates folder info</string>
<string name="uploader_local_files_uploaded">Try to upload local files again</string>
<string name="uploader_local_files_uploaded">Retry to upload failed local files</string>
<string name="uploader_file_not_found_on_server_message">We couldnt locate the file on server. Another user may have deleted the file</string>
<string name="uploader_file_not_found_message">File not found. Are you sure that this file exists or has a previous conflict not been resolved?</string>
<string name="uploader_upload_failed_sync_conflict_error">File upload conflict</string>