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