mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Make new feedback to be added as a new section to the end of the page (#5753)
* feedback: add the feedback as a new section at end of the page Addresses feedback on #5542. For auto-archiving of section to work properly on our feedback page, the new sections need to be created at the end of the page rather than at the top. So, adjust the feedback addition logic to make it such that the feedback is appended to the bottom of the page. * Replace lambda with a method reference * feedback: replace edit summary with something more relevant The summary of the feedback page was unhelpful. Make it more helpful by using a more helpful summary that at least mentions the version of the app for which the feedback is posted. * test: try to fix test case related to feedback change
This commit is contained in:
		
							parent
							
								
									0e39d93721
								
							
						
					
					
						commit
						1808699e89
					
				
					 6 changed files with 100 additions and 52 deletions
				
			
		|  | @ -153,9 +153,14 @@ public class MoreBottomSheetFragment extends BottomSheetDialogFragment { | |||
|     void uploadFeedback(final Feedback feedback) { | ||||
|         final FeedbackContentCreator feedbackContentCreator = new FeedbackContentCreator(getContext(), feedback); | ||||
| 
 | ||||
|         Single<Boolean> single = | ||||
|             pageEditClient.prependEdit("Commons:Mobile_app/Feedback", feedbackContentCreator.toString(), "Summary") | ||||
|                 .flatMapSingle(result -> Single.just(result)) | ||||
|         final Single<Boolean> single = | ||||
|             pageEditClient.createNewSection( | ||||
|                     "Commons:Mobile_app/Feedback", | ||||
|                     feedbackContentCreator.getSectionTitle(), | ||||
|                     feedbackContentCreator.getSectionText(), | ||||
|                     "New feedback on version " + feedback.getVersion() + " of the app" | ||||
|                 ) | ||||
|                 .flatMapSingle(Single::just) | ||||
|                 .firstOrError(); | ||||
| 
 | ||||
|         Single.defer((Callable<SingleSource<Boolean>>) () -> single) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kaartic Sivaraam
						Kaartic Sivaraam