mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	Injected the ContributionDao where needed.
This commit is contained in:
		
							parent
							
								
									f2ed57a127
								
							
						
					
					
						commit
						9927879680
					
				
					 9 changed files with 70 additions and 46 deletions
				
			
		|  | @ -23,6 +23,7 @@ import fr.free.nrw.commons.nearby.NearbyPlaces; | |||
| import fr.free.nrw.commons.upload.UploadController; | ||||
| 
 | ||||
| import static android.content.Context.MODE_PRIVATE; | ||||
| import static fr.free.nrw.commons.contributions.ContributionsContentProvider.CONTRIBUTION_AUTHORITY; | ||||
| 
 | ||||
| @Module | ||||
| @SuppressWarnings({"WeakerAccess", "unused"}) | ||||
|  | @ -42,10 +43,16 @@ public class CommonsApplicationModule { | |||
| 
 | ||||
|     @Provides | ||||
|     @Named("category") | ||||
|     public ContentProviderClient provideContentProviderClient() { | ||||
|     public ContentProviderClient provideCategoryContentProviderClient() { | ||||
|         return application.getContentResolver().acquireContentProviderClient(CATEGORY_AUTHORITY); | ||||
|     } | ||||
| 
 | ||||
|     @Provides | ||||
|     @Named("contribution") | ||||
|     public ContentProviderClient provideContributionContentProviderClient() { | ||||
|         return application.getContentResolver().acquireContentProviderClient(CONTRIBUTION_AUTHORITY); | ||||
|     } | ||||
| 
 | ||||
|     @Provides | ||||
|     @Named("application_preferences") | ||||
|     public SharedPreferences providesApplicationSharedPreferences() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Paul Hawke
						Paul Hawke