mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Make login work across sessions
This commit is contained in:
		
							parent
							
								
									1ea0a1ebeb
								
							
						
					
					
						commit
						9c23a8c34b
					
				
					 7 changed files with 56 additions and 41 deletions
				
			
		|  | @ -96,14 +96,15 @@ public class CommonsApplicationModule { | |||
|     @Provides | ||||
|     @Singleton | ||||
|     public SessionManager providesSessionManager(Context context, | ||||
|                                                  MediaWikiApi mediaWikiApi) { | ||||
|         return new SessionManager(context, mediaWikiApi); | ||||
|                                                  MediaWikiApi mediaWikiApi, | ||||
|                                                  @Named("default_preferences") SharedPreferences sharedPreferences) { | ||||
|         return new SessionManager(context, mediaWikiApi, sharedPreferences); | ||||
|     } | ||||
| 
 | ||||
|     @Provides | ||||
|     @Singleton | ||||
|     public MediaWikiApi provideMediaWikiApi(Context context) { | ||||
|         return new ApacheHttpClientMediaWikiApi(context, BuildConfig.WIKIMEDIA_API_HOST); | ||||
|     public MediaWikiApi provideMediaWikiApi(Context context, @Named("default_preferences") SharedPreferences sharedPreferences) { | ||||
|         return new ApacheHttpClientMediaWikiApi(context, BuildConfig.WIKIMEDIA_API_HOST, sharedPreferences); | ||||
|     } | ||||
| 
 | ||||
|     @Provides | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 maskara
						maskara