fix HistoryBrowser crash

This commit is contained in:
Milos Kozak 2020-06-04 14:34:40 +02:00
parent fbb15cac70
commit 064389d066

View file

@ -338,19 +338,20 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
} }
// finally enforce drawing of graphs in UI thread // finally enforce drawing of graphs in UI thread
graphData.performUpdate() graphData.performUpdate()
for (g in 0 until secondaryGraphs.size) { if (!bgOnly)
secondaryGraphsLabel[g].text = overviewMenus.enabledTypes(g + 1) for (g in 0 until secondaryGraphs.size) {
secondaryGraphs[g].visibility = (!bgOnly && ( secondaryGraphsLabel[g].text = overviewMenus.enabledTypes(g + 1)
overviewMenus.setting[g + 1][OverviewMenus.CharType.IOB.ordinal] || secondaryGraphs[g].visibility = (!bgOnly && (
overviewMenus.setting[g + 1][OverviewMenus.CharType.COB.ordinal] || overviewMenus.setting[g + 1][OverviewMenus.CharType.IOB.ordinal] ||
overviewMenus.setting[g + 1][OverviewMenus.CharType.DEV.ordinal] || overviewMenus.setting[g + 1][OverviewMenus.CharType.COB.ordinal] ||
overviewMenus.setting[g + 1][OverviewMenus.CharType.SEN.ordinal] || overviewMenus.setting[g + 1][OverviewMenus.CharType.DEV.ordinal] ||
overviewMenus.setting[g + 1][OverviewMenus.CharType.ACT.ordinal] || overviewMenus.setting[g + 1][OverviewMenus.CharType.SEN.ordinal] ||
overviewMenus.setting[g + 1][OverviewMenus.CharType.ABS.ordinal] || overviewMenus.setting[g + 1][OverviewMenus.CharType.ACT.ordinal] ||
overviewMenus.setting[g + 1][OverviewMenus.CharType.DEVSLOPE.ordinal] overviewMenus.setting[g + 1][OverviewMenus.CharType.ABS.ordinal] ||
)).toVisibility() overviewMenus.setting[g + 1][OverviewMenus.CharType.DEVSLOPE.ordinal]
secondaryGraphsData[g].performUpdate() )).toVisibility()
} secondaryGraphsData[g].performUpdate()
}
} }
} }
} }