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() {
320
320
finish ();
321
321
}
322
322
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
+
323
331
/**
324
332
* Show/Hide the progress dialog
325
333
*/
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ public interface View {
18
18
19
19
void returnToMainActivity ();
20
20
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
+
21
28
void askUserToLogIn ();
22
29
23
30
/**
Original file line number Diff line number Diff line change @@ -123,6 +123,9 @@ public void onError(Throwable e) {
123
123
view .returnToMainActivity ();
124
124
compositeDisposable .clear ();
125
125
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
126
129
}
127
130
128
131
@ Override
@@ -131,6 +134,10 @@ public void onComplete() {
131
134
repository .cleanup ();
132
135
view .returnToMainActivity ();
133
136
compositeDisposable .clear ();
137
+
138
+ //after finish the uploadActivity, if successful,
139
+ //directly go to the upload progress activity
140
+ view .goToUploadProgressActivity ();
134
141
}
135
142
});
136
143
} else {
You can’t perform that action at this time.
0 commit comments