Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Prevent double month label

laurenspriem6da8977a2ce9
diff --git a/mobile/apps/photos/lib/ui/activity/activity_heatmap_card.dart b/mobile/apps/photos/lib/ui/activity/activity_heatmap_card.dart
index 6d9df28402..2ebcd2fc9b 100644
--- a/mobile/apps/photos/lib/ui/activity/activity_heatmap_card.dart
+++ b/mobile/apps/photos/lib/ui/activity/activity_heatmap_card.dart
@@ -189,6 +189,16 @@ class _Heatmap extends StatelessWidget {
monthLabels[rowIndex] = _monthLabel(firstDay.month);
}
+ final String? bottomMonthLabel = monthLabels[weeks.length - 1];
+ if (bottomMonthLabel != null) {
+ for (final int rowIndex in [0, 1]) {
+ if (rowIndex < weeks.length &&
+ monthLabels[rowIndex] == bottomMonthLabel) {
+ monthLabels.remove(rowIndex);
+ }
+ }
+ }
+
return LayoutBuilder(
builder: (context, constraints) {
final double baseMonthLabelWidth = compact ? 28 : 32;