mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Fixed constantly failing uploads
This commit is contained in:
parent
efa7ae7736
commit
72500b2dc2
1 changed files with 4 additions and 4 deletions
|
|
@ -798,10 +798,6 @@ public class ContributionsFragment
|
|||
*/
|
||||
public void restartUpload(Contribution contribution) {
|
||||
contribution.setState(Contribution.STATE_QUEUED);
|
||||
if (contribution.getErrorInfo() == null){
|
||||
contribution.setChunkInfo(null);
|
||||
contribution.setTransferred(0);
|
||||
}
|
||||
contributionsPresenter.saveContribution(contribution);
|
||||
Timber.d("Restarting for %s", contribution.toString());
|
||||
}
|
||||
|
|
@ -826,6 +822,10 @@ public class ContributionsFragment
|
|||
contribution.setRetries(retries + 1);
|
||||
Timber.d("Retried uploading %s %d times", contribution.getMedia().getFilename(),
|
||||
retries + 1);
|
||||
if (contribution.getErrorInfo() == null){
|
||||
contribution.setChunkInfo(null);
|
||||
contribution.setTransferred(0);
|
||||
}
|
||||
restartUpload(contribution);
|
||||
} else {
|
||||
// TODO: Show the exact reason for failure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue