Fix db access in RemoteMegaphoneRepository.
This commit is contained in:
parent
7eac9ce1f4
commit
36bfd19bcf
1 changed files with 6 additions and 2 deletions
|
@ -40,16 +40,20 @@ object RemoteMegaphoneRepository {
|
|||
|
||||
private val snooze: Action = Action { _, controller, remote ->
|
||||
controller.onMegaphoneSnooze(Megaphones.Event.REMOTE_MEGAPHONE)
|
||||
SignalExecutors.BOUNDED_IO.execute {
|
||||
db.snooze(remote)
|
||||
}
|
||||
}
|
||||
|
||||
private val finish: Action = Action { context, controller, remote ->
|
||||
if (remote.imageUri != null) {
|
||||
BlobProvider.getInstance().delete(context, remote.imageUri)
|
||||
}
|
||||
controller.onMegaphoneSnooze(Megaphones.Event.REMOTE_MEGAPHONE)
|
||||
SignalExecutors.BOUNDED_IO.execute {
|
||||
db.markFinished(remote.uuid)
|
||||
}
|
||||
}
|
||||
|
||||
private val donate: Action = Action { context, controller, remote ->
|
||||
controller.onMegaphoneNavigationRequested(CheckoutFlowActivity.createIntent(context, InAppPaymentType.ONE_TIME_DONATION))
|
||||
|
|
Loading…
Add table
Reference in a new issue