mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Add shared preferences provider for latest notification activity visit time
This commit is contained in:
parent
a2be516bc5
commit
6168aee6ac
1 changed files with 11 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue