diff --git a/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/components/visualizations.kt b/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/components/visualizations.kt
index a27ded3..e552996 100644
--- a/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/components/visualizations.kt
+++ b/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/components/visualizations.kt
@@ -72,19 +72,21 @@ fun VariableWidth1DHeatmap(
) {
values.fastForEachIndexed { index, item ->
if (item > 0L) {
- val shape = when (index) {
- firstNonZeroIndex -> shapes.large.copy(
- topEnd = shapes.extraSmall.topEnd,
- bottomEnd = shapes.extraSmall.bottomEnd
- )
+ val shape =
+ if (firstNonZeroIndex == lastNonZeroIndex) shapes.large
+ else when (index) {
+ firstNonZeroIndex -> shapes.large.copy(
+ topEnd = shapes.extraSmall.topEnd,
+ bottomEnd = shapes.extraSmall.bottomEnd
+ )
- lastNonZeroIndex -> shapes.large.copy(
- topStart = shapes.extraSmall.topStart,
- bottomStart = shapes.extraSmall.bottomStart
- )
+ lastNonZeroIndex -> shapes.large.copy(
+ topStart = shapes.extraSmall.topStart,
+ bottomStart = shapes.extraSmall.bottomStart
+ )
- else -> shapes.extraSmall
- }
+ else -> shapes.extraSmall
+ }
Spacer(
Modifier
.weight(item.toFloat())
diff --git a/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/screens/LastWeekScreen.kt b/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/screens/LastWeekScreen.kt
index adb64a6..f886975 100644
--- a/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/screens/LastWeekScreen.kt
+++ b/app/src/main/java/org/nsh07/pomodoro/ui/statsScreen/screens/LastWeekScreen.kt
@@ -204,11 +204,11 @@ fun SharedTransitionScope.LastWeekScreen(
item {
Text(
- "Focus overview",
+ stringResource(R.string.focus_overview),
style = typography.headlineSmall
)
Text(
- "Average focus durations at different times of the day",
+ stringResource(R.string.focus_overview_desc),
style = typography.bodySmall,
color = colorScheme.onSurfaceVariant
)
@@ -249,11 +249,11 @@ fun SharedTransitionScope.LastWeekScreen(
item {
Text(
- "Focus insights",
+ stringResource(R.string.focus_insights),
style = typography.headlineSmall
)
Text(
- "Focus overview of each day of the past week",
+ stringResource(R.string.focus_insights_desc),
style = typography.bodySmall,
color = colorScheme.onSurfaceVariant
)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 24df1ec..0c421ae 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -114,4 +114,8 @@
Timer reset
Undo
Focus-break ratio
+ Focus overview
+ Average focus durations at different times of the day
+ Focus insights
+ Focus overview of each day of the past week (click on each cell for more info)
\ No newline at end of file