mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-11-04 08:43:52 +01:00 
			
		
		
		
	Switch to uploading from gallery
This commit is contained in:
		
							parent
							
								
									66d895f9b8
								
							
						
					
					
						commit
						aae490a469
					
				
					 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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -398,19 +398,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