mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	Use Dagger injection to store title and desc
This commit is contained in:
		
							parent
							
								
									9354c1c93e
								
							
						
					
					
						commit
						a03ea07608
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -25,7 +25,7 @@ public class DirectUpload { | |||
|     private Fragment fragment; | ||||
|     private SharedPreferences prefs; | ||||
| 
 | ||||
| 
 | ||||
|     @Inject @Named("direct_nearby_upload_prefs") SharedPreferences directPrefs; | ||||
| 
 | ||||
|     DirectUpload(String title, String desc, Fragment fragment, ContributionController controller, SharedPreferences prefs) { | ||||
|         this.title = title; | ||||
|  | @ -36,8 +36,7 @@ public class DirectUpload { | |||
|     } | ||||
| 
 | ||||
|     void storeSharedPrefs() { | ||||
|         SharedPreferences sharedPref = fragment.getActivity().getSharedPreferences("Direct Upload", Context.MODE_PRIVATE); | ||||
|         SharedPreferences.Editor editor = sharedPref.edit(); | ||||
|         SharedPreferences.Editor editor = directPrefs.edit(); | ||||
| 
 | ||||
|         editor.putString("Title", title); | ||||
|         editor.putString("Desc", desc); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 misaochan
						misaochan