mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
fix bug in unblock number that crashed app by attempting to execute realm transaction on main thread. moved transaction to execute on io thread.
This commit is contained in:
+16
-14
@@ -39,24 +39,26 @@ class BlockedNumbersPresenter @Inject constructor(
|
||||
super.bindIntents(view)
|
||||
|
||||
view.unblockAddress()
|
||||
.doOnNext { id ->
|
||||
blockingRepo.getBlockedNumber(id)?.address
|
||||
?.let(conversationRepo::getThreadId)
|
||||
?.let { threadId -> markUnblocked.execute(listOf(threadId)) }
|
||||
}
|
||||
.doOnNext(blockingRepo::unblockNumber)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
.observeOn(Schedulers.io())
|
||||
.doOnNext { id ->
|
||||
blockingRepo.getBlockedNumber(id)?.address
|
||||
?.let(conversationRepo::getThreadId)
|
||||
?.let { threadId -> markUnblocked.execute(listOf(threadId)) }
|
||||
}
|
||||
.doOnNext(blockingRepo::unblockNumber)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
|
||||
view.addAddress()
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { view.showAddDialog() }
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { view.showAddDialog() }
|
||||
|
||||
view.saveAddress()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { address -> blockingRepo.blockNumber(address) }
|
||||
.observeOn(Schedulers.io())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { address -> blockingRepo.blockNumber(address) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user