mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Switch to uploading from gallery
This commit is contained in:
		
							parent
							
								
									946c6c740d
								
							
						
					
					
						commit
						b76ecf74f8
					
				
					 2 changed files with 5 additions and 8 deletions
				
			
		|  | @ -45,7 +45,7 @@ class DirectUpload { | |||
|         Timber.d("After shared prefs, image title: " + imageTitle + " Image desc: " + imageDesc); | ||||
|     } | ||||
| 
 | ||||
|     void initiateUpload(Context context) { | ||||
|     void initiateGalleryUpload(Context context) { | ||||
|         Activity activity = (Activity) context; | ||||
| 
 | ||||
|         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | ||||
|  |  | |||
|  | @ -383,19 +383,16 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment { | |||
|         distance.setText(place.distance.toString()); | ||||
| 
 | ||||
|         fabCamera.setOnClickListener(view -> { | ||||
|             //TODO: Change this to activate camera upload (see ContributionsListFragment). Insert shared preference. | ||||
|             Timber.d("Image title: " + place.getName() + "Image desc: " + place.getLongDescription()); | ||||
| 
 | ||||
|             DirectUpload directUpload = new DirectUpload(place.getName(), place.getLongDescription(), this); | ||||
|             directUpload.storeSharedPrefs(getActivity()); | ||||
|             directUpload.initiateUpload(getActivity()); | ||||
| 
 | ||||
|         }); | ||||
| 
 | ||||
|         fabGallery.setOnClickListener(view -> { | ||||
|             //TODO: Change this to activate gallery upload (see ContributionsListFragment). Insert shared preference. | ||||
|             Timber.d("Image title: " + place.getName() + "Image desc: " + place.getLongDescription()); | ||||
|             openWebView(place.siteLinks.getWikidataLink()); | ||||
| 
 | ||||
|             DirectUpload directUpload = new DirectUpload(place.getName(), place.getLongDescription(), this); | ||||
|             directUpload.storeSharedPrefs(getActivity()); | ||||
|             directUpload.initiateGalleryUpload(getActivity()); | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 misaochan
						misaochan