public class IgnoreStatusRepository extends Object
Constructor and Description |
---|
IgnoreStatusRepository(Context context)
A constructor for this repository.
|
Modifier and Type | Method and Description |
---|---|
Completable |
delete(IgnoreStatus ignoreStatus)
This is a method that deletes the ignore status.
|
LiveData<List<IgnoreStatus>> |
getAllIgnoredContacts(int ignoreLimit)
A method that checks to see all of your ignored contacts.
|
LiveData<IgnoreStatus> |
getIgnoreStatus(long ignoreStatusId)
A method that gets the ignore status by Id.
|
LiveData<IgnoreStatus> |
getIgnoreStatusForContact(String contactUri)
A method to check for the ignore status of each contact.
|
LiveData<List<IgnoreStatus>> |
getMostIgnoredContacts(int numContacts) |
Completable |
save(IgnoreStatus ignoreStatus)
A save method to update the ignoreStatus on each contact.
|
public IgnoreStatusRepository(Context context)
context
- , takes in a context objectpublic Completable save(IgnoreStatus ignoreStatus)
ignoreStatus
- , takes in an IgnoreStatus object, which is tied to a contact.public Completable delete(IgnoreStatus ignoreStatus)
ignoreStatus
- , takes in an IgnoreStatus object, which is tied to a contact.public LiveData<IgnoreStatus> getIgnoreStatusForContact(String contactUri)
contactUri
- , a String that represents the contact in Android.public LiveData<List<IgnoreStatus>> getMostIgnoredContacts(int numContacts)
numContacts
- , an int that represents the top ignored contacts, for instance the top 5.
Helpful for users to consider deleting these contacts or re-evaluating.public LiveData<List<IgnoreStatus>> getAllIgnoredContacts(int ignoreLimit)
ignoreLimit
- , how many times a user is ignored, before they get put on the ignore list.public LiveData<IgnoreStatus> getIgnoreStatus(long ignoreStatusId)
ignoreStatusId
- , a long that is ignorestatusId.