Simplify API for sending messages

This commit is contained in:
Moez Bhatti
2018-06-27 16:22:42 -04:00
parent e8765a22df
commit 81d77eb1d9
6 changed files with 99 additions and 96 deletions
@@ -57,18 +57,13 @@ interface MessageRepository {
fun markUnread(vararg threadIds: Long)
/**
* Persists the SMS and attempts to send it
*/
fun sendSmsAndPersist(subId: Int, threadId: Long, address: String, body: String)
fun sendMessage(subId: Int, threadId: Long, addresses: List<String>, body: String, attachments: List<Attachment>, delay: Int = 0)
/**
* Attempts to send the SMS message. This can be called if the message has already been persisted
*/
fun sendSms(message: Message)
fun sendMms(subId: Int, threadId: Long, addresses: List<String>, body: String, attachments: List<Attachment>)
/**
* Attempts to cancel sending the message with the given id
*/