mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +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) {
|
public void restartUpload(Contribution contribution) {
|
||||||
contribution.setState(Contribution.STATE_QUEUED);
|
contribution.setState(Contribution.STATE_QUEUED);
|
||||||
if (contribution.getErrorInfo() == null){
|
|
||||||
contribution.setChunkInfo(null);
|
|
||||||
contribution.setTransferred(0);
|
|
||||||
}
|
|
||||||
contributionsPresenter.saveContribution(contribution);
|
contributionsPresenter.saveContribution(contribution);
|
||||||
Timber.d("Restarting for %s", contribution.toString());
|
Timber.d("Restarting for %s", contribution.toString());
|
||||||
}
|
}
|
||||||
|
|
@ -826,6 +822,10 @@ public class ContributionsFragment
|
||||||
contribution.setRetries(retries + 1);
|
contribution.setRetries(retries + 1);
|
||||||
Timber.d("Retried uploading %s %d times", contribution.getMedia().getFilename(),
|
Timber.d("Retried uploading %s %d times", contribution.getMedia().getFilename(),
|
||||||
retries + 1);
|
retries + 1);
|
||||||
|
if (contribution.getErrorInfo() == null){
|
||||||
|
contribution.setChunkInfo(null);
|
||||||
|
contribution.setTransferred(0);
|
||||||
|
}
|
||||||
restartUpload(contribution);
|
restartUpload(contribution);
|
||||||
} else {
|
} else {
|
||||||
// TODO: Show the exact reason for failure
|
// TODO: Show the exact reason for failure
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue