mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix for #5846: After uploading via Nearby, I am sent back to Nearby, where I am mislead into thinking that I must upload again #5846 (#5874)
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
parent
ba7348f83f
commit
9c1c95f5cf
3 changed files with 22 additions and 0 deletions
|
|
@ -320,6 +320,14 @@ public class UploadActivity extends BaseActivity implements UploadContract.View,
|
|||
finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* go to the uploadProgress activity to check the status of uploading
|
||||
*/
|
||||
@Override
|
||||
public void goToUploadProgressActivity() {
|
||||
startActivity(new Intent(this, UploadProgressActivity.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show/Hide the progress dialog
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,6 +18,13 @@ public interface UploadContract {
|
|||
|
||||
void returnToMainActivity();
|
||||
|
||||
/**
|
||||
* When submission successful, go to the loadProgressActivity to hint the user this
|
||||
* submission is valid. And the user will see the upload progress in this activity;
|
||||
* Fixes: <a href="https://github.com/commons-app/apps-android-commons/issues/5846">Issue</a>
|
||||
*/
|
||||
void goToUploadProgressActivity();
|
||||
|
||||
void askUserToLogIn();
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -123,6 +123,9 @@ public class UploadPresenter implements UploadContract.UserActionListener {
|
|||
view.returnToMainActivity();
|
||||
compositeDisposable.clear();
|
||||
Timber.e("failed to upload: " + e.getMessage());
|
||||
|
||||
//is submission error, not need to go to the uploadActivity
|
||||
//not start the uploading progress
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -131,6 +134,10 @@ public class UploadPresenter implements UploadContract.UserActionListener {
|
|||
repository.cleanup();
|
||||
view.returnToMainActivity();
|
||||
compositeDisposable.clear();
|
||||
|
||||
//after finish the uploadActivity, if successful,
|
||||
//directly go to the upload progress activity
|
||||
view.goToUploadProgressActivity();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue