catch InterruptedException
This commit is contained in:
parent
c4ac42f738
commit
db83bf4653
1 changed files with 30 additions and 29 deletions
|
@ -185,28 +185,29 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
disposable.add(rxBus
|
disposable += rxBus
|
||||||
.toObservable(EventAutosensCalculationFinished::class.java)
|
.toObservable(EventAutosensCalculationFinished::class.java)
|
||||||
.observeOn(aapsSchedulers.io)
|
.observeOn(aapsSchedulers.io)
|
||||||
.subscribe({
|
.subscribe({
|
||||||
// catch only events from iobCobCalculator
|
// catch only events from iobCobCalculator
|
||||||
if (it.cause is EventCustomCalculationFinished)
|
if (it.cause is EventCustomCalculationFinished)
|
||||||
|
try {
|
||||||
refreshLoop("EventAutosensCalculationFinished")
|
refreshLoop("EventAutosensCalculationFinished")
|
||||||
|
} catch (e: InterruptedException) {
|
||||||
|
fabricPrivacy.logException(e)
|
||||||
|
}
|
||||||
}, fabricPrivacy::logException)
|
}, fabricPrivacy::logException)
|
||||||
)
|
disposable += rxBus
|
||||||
disposable.add(rxBus
|
|
||||||
.toObservable(EventIobCalculationProgress::class.java)
|
.toObservable(EventIobCalculationProgress::class.java)
|
||||||
.observeOn(aapsSchedulers.main)
|
.observeOn(aapsSchedulers.main)
|
||||||
.subscribe({
|
.subscribe({
|
||||||
if (it.cause is EventCustomCalculationFinished)
|
if (it.cause is EventCustomCalculationFinished)
|
||||||
binding.overviewIobcalculationprogess.text = it.progress
|
binding.overviewIobcalculationprogess.text = it.progress
|
||||||
}, fabricPrivacy::logException)
|
}, fabricPrivacy::logException)
|
||||||
)
|
disposable += rxBus
|
||||||
disposable.add(rxBus
|
|
||||||
.toObservable(EventRefreshOverview::class.java)
|
.toObservable(EventRefreshOverview::class.java)
|
||||||
.observeOn(aapsSchedulers.main)
|
.observeOn(aapsSchedulers.main)
|
||||||
.subscribe({ updateGUI("EventRefreshOverview") }, fabricPrivacy::logException)
|
.subscribe({ updateGUI("EventRefreshOverview") }, fabricPrivacy::logException)
|
||||||
)
|
|
||||||
disposable += rxBus
|
disposable += rxBus
|
||||||
.toObservable(EventBucketedDataCreated::class.java)
|
.toObservable(EventBucketedDataCreated::class.java)
|
||||||
.observeOn(aapsSchedulers.io)
|
.observeOn(aapsSchedulers.io)
|
||||||
|
|
Loading…
Reference in a new issue