File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
app/src/main/java/fr/free/nrw/commons/upload Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,14 @@ public void returnToMainActivity() {
320320 finish ();
321321 }
322322
323+ /**
324+ * go to the uploadProgress activity to check the status of uploading
325+ */
326+ @ Override
327+ public void goToUploadProgressActivity () {
328+ startActivity (new Intent (this , UploadProgressActivity .class ));
329+ }
330+
323331 /**
324332 * Show/Hide the progress dialog
325333 */
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ public interface View {
1818
1919 void returnToMainActivity ();
2020
21+ /**
22+ * When submission successful, go to the loadProgressActivity to hint the user this
23+ * submission is valid. And the user will see the upload progress in this activity;
24+ * Fixes: <a href="https://github.com/commons-app/apps-android-commons/issues/5846">Issue</a>
25+ */
26+ void goToUploadProgressActivity ();
27+
2128 void askUserToLogIn ();
2229
2330 /**
Original file line number Diff line number Diff line change @@ -123,6 +123,9 @@ public void onError(Throwable e) {
123123 view .returnToMainActivity ();
124124 compositeDisposable .clear ();
125125 Timber .e ("failed to upload: " + e .getMessage ());
126+
127+ //is submission error, not need to go to the uploadActivity
128+ //not start the uploading progress
126129 }
127130
128131 @ Override
@@ -131,6 +134,10 @@ public void onComplete() {
131134 repository .cleanup ();
132135 view .returnToMainActivity ();
133136 compositeDisposable .clear ();
137+
138+ //after finish the uploadActivity, if successful,
139+ //directly go to the upload progress activity
140+ view .goToUploadProgressActivity ();
134141 }
135142 });
136143 } else {
You can’t perform that action at this time.
0 commit comments