Skip to content

Commit

Permalink
SummaryView: Move mosaic to the bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
Inky-developer committed Dec 26, 2024
1 parent a7316b2 commit 89a9fbf
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions app/src/main/java/com/inky/fitnesscalendar/ui/views/SummaryView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
)
}
}
}
}

Expand Down

0 comments on commit 89a9fbf

Please sign in to comment.