diff --git a/app/src/main/java/fr/free/nrw/commons/di/CommonsApplicationModule.java b/app/src/main/java/fr/free/nrw/commons/di/CommonsApplicationModule.java index 99db50d0a..fdccb2878 100644 --- a/app/src/main/java/fr/free/nrw/commons/di/CommonsApplicationModule.java +++ b/app/src/main/java/fr/free/nrw/commons/di/CommonsApplicationModule.java @@ -108,6 +108,17 @@ public class CommonsApplicationModule { 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 public UploadController providesUploadController(SessionManager sessionManager, @Named("default_preferences") SharedPreferences sharedPreferences, Context context) { return new UploadController(sessionManager, context, sharedPreferences);