From 89a9fbfa062f088899d0fe14167a11e54ce79ea9 Mon Sep 17 00:00:00 2001 From: Inky-developer Date: Thu, 26 Dec 2024 22:17:47 +0100 Subject: [PATCH] SummaryView: Move mosaic to the bottom --- .../fitnesscalendar/ui/views/SummaryView.kt | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/com/inky/fitnesscalendar/ui/views/SummaryView.kt b/app/src/main/java/com/inky/fitnesscalendar/ui/views/SummaryView.kt index 7d9ef2c..8f8875f 100644 --- a/app/src/main/java/com/inky/fitnesscalendar/ui/views/SummaryView.kt +++ b/app/src/main/java/com/inky/fitnesscalendar/ui/views/SummaryView.kt @@ -206,23 +206,6 @@ private fun SummaryViewInner(state: SummaryState, onEditFilter: (ActivityFilter) item(key = "SummaryBox") { SummaryBox(state.summaryBoxState) } - item(key = "mosaic") { - if (state.filter.range == null) { - MosaicChart( - state.mosaicState, - hoverText = { entry -> - val date = entry.data.format(LocalizationRepository.shortLocalDateFormatter) - pluralStringResource( - R.plurals.tooltip_activities_on_day, - entry.count, - date, - entry.count - ) - } - ) - } - } - item(key = "PlaceBox") { PlaceBox(state.places) } if (state.feelChartState.dataPoints.size > 1) { @@ -266,6 +249,24 @@ private fun SummaryViewInner(state: SummaryState, onEditFilter: (ActivityFilter) xAxisLabel = stringResource(R.string.Hour) ) } + + item(key = "mosaic") { + if (state.filter.range == null) { + MosaicChart( + state.mosaicState, + hoverText = { entry -> + val date = entry.data.format(LocalizationRepository.shortLocalDateFormatter) + pluralStringResource( + R.plurals.tooltip_activities_on_day, + entry.count, + date, + entry.count + ) + }, + modifier = Modifier.padding(vertical = 8.dp) + ) + } + } } }