mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +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
This commit is contained in:
		
							parent
							
								
									c77e5abba7
								
							
						
					
					
						commit
						945d85866a
					
				
					 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
	
	 u7837228
						u7837228