Add shared preferences provider for latest notification activity visit time

This commit is contained in:
neslihanturan 2018-09-09 21:39:45 +03:00
parent a2be516bc5
commit 6168aee6ac

View file

@ -108,6 +108,17 @@ public class CommonsApplicationModule {
return context.getSharedPreferences("direct_nearby_upload_prefs", MODE_PRIVATE); return context.getSharedPreferences("direct_nearby_upload_prefs", MODE_PRIVATE);
} }
/**
* Is used to determine when user is viewed notifications activity last
* @param context
* @return date of lastReadNotificationDate
*/
@Provides
@Named("last_read_notification_date")
public SharedPreferences providesLastReadNotificationDatePreferences(Context context) {
return context.getSharedPreferences("last_read_notification_date", MODE_PRIVATE);
}
@Provides @Provides
public UploadController providesUploadController(SessionManager sessionManager, @Named("default_preferences") SharedPreferences sharedPreferences, Context context) { public UploadController providesUploadController(SessionManager sessionManager, @Named("default_preferences") SharedPreferences sharedPreferences, Context context) {
return new UploadController(sessionManager, context, sharedPreferences); return new UploadController(sessionManager, context, sharedPreferences);