mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	feat: Add checks for title and description in intent extras.
In case other apps want to send a title and description along with the image, we check if those have been passed as intent extras and set the EditText values accordingly. Fixes: #1273 See also: #892
This commit is contained in:
		
							parent
							
								
									2516445d68
								
							
						
					
					
						commit
						87b794ce1f
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -101,6 +101,14 @@ public class SingleUploadFragment extends CommonsDaggerSupportFragment { | |||
|         View rootView = inflater.inflate(R.layout.fragment_single_upload, container, false); | ||||
|         ButterKnife.bind(this, rootView); | ||||
| 
 | ||||
|         Intent activityIntent = getActivity().getIntent(); | ||||
|         if (activityIntent.hasExtra("title")) { | ||||
|             titleEdit.setText(activityIntent.getStringExtra("title")); | ||||
|         } | ||||
|         if (activityIntent.hasExtra("description")) { | ||||
|             descEdit.setText(activityIntent.getStringExtra("description")); | ||||
|         } | ||||
| 
 | ||||
|         ArrayList<String> licenseItems = new ArrayList<>(); | ||||
|         licenseItems.add(getString(R.string.license_name_cc0)); | ||||
|         licenseItems.add(getString(R.string.license_name_cc_by)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 yashshah7197
						yashshah7197