mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Create ContributionController object
This commit is contained in:
		
							parent
							
								
									fdcf41e88b
								
							
						
					
					
						commit
						da5e20a547
					
				
					 2 changed files with 5 additions and 3 deletions
				
			
		|  | @ -25,14 +25,14 @@ import static fr.free.nrw.commons.contributions.Contribution.SOURCE_CAMERA; | |||
| import static fr.free.nrw.commons.contributions.Contribution.SOURCE_GALLERY; | ||||
| import static fr.free.nrw.commons.upload.UploadService.EXTRA_SOURCE; | ||||
| 
 | ||||
| class ContributionController { | ||||
| public class ContributionController { | ||||
| 
 | ||||
|     private static final int SELECT_FROM_GALLERY = 1; | ||||
|     private static final int SELECT_FROM_CAMERA = 2; | ||||
| 
 | ||||
|     private Fragment fragment; | ||||
| 
 | ||||
|     ContributionController(Fragment fragment) { | ||||
|     public ContributionController(Fragment fragment) { | ||||
|         this.fragment = fragment; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -4,6 +4,7 @@ import android.app.Activity; | |||
| import android.content.Context; | ||||
| import android.content.SharedPreferences; | ||||
| import android.os.Build; | ||||
| import android.support.v4.app.Fragment; | ||||
| import android.support.v4.content.ContextCompat; | ||||
| import android.support.v7.app.AlertDialog; | ||||
| 
 | ||||
|  | @ -20,9 +21,10 @@ class DirectUpload { | |||
|     private String desc; | ||||
|     private ContributionController controller; | ||||
| 
 | ||||
|     DirectUpload(String title, String desc) { | ||||
|     DirectUpload(String title, String desc, Fragment fragment) { | ||||
|         this.title = title; | ||||
|         this.desc = desc; | ||||
|         controller = new ContributionController(fragment); | ||||
|     } | ||||
| 
 | ||||
|     void storeSharedPrefs(Context context) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 misaochan
						misaochan