mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Sync MMS once sent
This commit is contained in:
@@ -18,6 +18,26 @@
|
||||
*/
|
||||
package presentation.receiver
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import com.klinker.android.send_message.MmsSentReceiver
|
||||
import common.di.appComponent
|
||||
import interactor.MarkMmsSent
|
||||
import javax.inject.Inject
|
||||
|
||||
class MmsSentReceiver : MmsSentReceiver()
|
||||
class MmsSentReceiver : MmsSentReceiver() {
|
||||
|
||||
@Inject lateinit var markMmsSent: MarkMmsSent
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
super.onReceive(context, intent)
|
||||
appComponent.inject(this)
|
||||
|
||||
Uri.parse(intent.getStringExtra("content_uri"))?.let { uri ->
|
||||
val pendingResult = goAsync()
|
||||
markMmsSent.execute(uri) { pendingResult.finish() }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user