catch InterruptedException

This commit is contained in:
Milos Kozak 2021-10-14 23:25:18 +02:00
parent c4ac42f738
commit db83bf4653

View file

@ -185,28 +185,29 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
override fun onResume() {
super.onResume()
disposable.add(rxBus
disposable += rxBus
.toObservable(EventAutosensCalculationFinished::class.java)
.observeOn(aapsSchedulers.io)
.subscribe({
// catch only events from iobCobCalculator
if (it.cause is EventCustomCalculationFinished)
try {
refreshLoop("EventAutosensCalculationFinished")
} catch (e: InterruptedException) {
fabricPrivacy.logException(e)
}
}, fabricPrivacy::logException)
)
disposable.add(rxBus
disposable += rxBus
.toObservable(EventIobCalculationProgress::class.java)
.observeOn(aapsSchedulers.main)
.subscribe({
if (it.cause is EventCustomCalculationFinished)
binding.overviewIobcalculationprogess.text = it.progress
}, fabricPrivacy::logException)
)
disposable.add(rxBus
disposable += rxBus
.toObservable(EventRefreshOverview::class.java)
.observeOn(aapsSchedulers.main)
.subscribe({ updateGUI("EventRefreshOverview") }, fabricPrivacy::logException)
)
disposable += rxBus
.toObservable(EventBucketedDataCreated::class.java)
.observeOn(aapsSchedulers.io)