From c8f5f4a116421dfefc652bf4ed53cb515932db2b Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 3 Oct 2021 12:04:03 +0200 Subject: [PATCH] optimize history browser --- .../androidaps/activities/HistoryBrowseActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt index a6a77c9dd2..c043614228 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt @@ -271,9 +271,12 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() { private fun loadAll(from: String) { updateDate() Thread { - overviewData.prepareBasalData(from) - overviewData.prepareTemporaryTargetData(from) + overviewData.prepareBgData("$from") overviewData.prepareTreatmentsData(from) + rxBus.send(EventRefreshOverview("loadAll_$from")) + overviewData.prepareTemporaryTargetData(from) + rxBus.send(EventRefreshOverview("loadAll_$from")) + overviewData.prepareBasalData(from) rxBus.send(EventRefreshOverview(from)) aapsLogger.debug(LTag.UI, "loadAll $from finished") runCalculation(from)