summaryrefslogtreecommitdiff
path: root/android/app/src/main/java/org/terst/doot
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-18 18:21:24 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-18 18:21:24 +0000
commit231f6f81ef60888de7309f589b6ebd2634159524 (patch)
tree40f4f3367aea0de7749705b01b183a7c72a89eeb /android/app/src/main/java/org/terst/doot
parent92909ebed5df68908f32c899de1e480f8d7fb01f (diff)
fix(widget): wrap TomorrowSection in a Column to stop rows overlapping
TomorrowSection emitted its divider, header, and every event/task row as top-level siblings with no shared layout container. Since the whole function is composed inside a single LazyColumn item{} slot (one RemoteViews node), nothing told Glance to stack them vertically -- they all rendered on top of each other instead of flowing top-to-bottom. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL
Diffstat (limited to 'android/app/src/main/java/org/terst/doot')
-rw-r--r--android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt49
1 files changed, 28 insertions, 21 deletions
diff --git a/android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt b/android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt
index 6515131..750dc7b 100644
--- a/android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt
+++ b/android/app/src/main/java/org/terst/doot/widget/ui/WidgetRows.kt
@@ -350,33 +350,40 @@ fun TomorrowSection(
zone: ZoneId,
textSize: WidgetTextSize
) {
- Box(modifier = GlanceModifier.fillMaxWidth().height(1.dp).padding(vertical = 4.dp).background(Color(0x1AFFFFFF))) {}
+ // This whole section renders inside a single LazyColumn `item { }` slot
+ // (see DootWidget.kt), which composes to one RemoteViews node -- without
+ // an explicit Column wrapping the divider/header/rows below, they have
+ // no shared vertical-flow container and all stack at the same position
+ // instead of flowing top-to-bottom.
+ Column(modifier = GlanceModifier.fillMaxWidth()) {
+ Box(modifier = GlanceModifier.fillMaxWidth().height(1.dp).padding(vertical = 4.dp).background(Color(0x1AFFFFFF))) {}
- Row(modifier = GlanceModifier.fillMaxWidth().padding(top = 6.dp, bottom = 2.dp)) {
- Text(
- "TOMORROW",
- style = TextStyle(
- color = ColorProvider(Color(0x99FFFFFF)),
- fontSize = textSize.scaledHeaderSize(11),
- fontWeight = textSize.scaledHeaderWeight(FontWeight.Bold)
+ Row(modifier = GlanceModifier.fillMaxWidth().padding(top = 6.dp, bottom = 2.dp)) {
+ Text(
+ "TOMORROW",
+ style = TextStyle(
+ color = ColorProvider(Color(0x99FFFFFF)),
+ fontSize = textSize.scaledHeaderSize(11),
+ fontWeight = textSize.scaledHeaderWeight(FontWeight.Bold)
+ )
)
- )
- }
+ }
- allDayEvents.forEach { AllDayRow(it, textSize) }
- multiDayEvents.forEach { (item, variant) -> AllDayRow(item, textSize, variant) }
+ allDayEvents.forEach { AllDayRow(it, textSize) }
+ multiDayEvents.forEach { (item, variant) -> AllDayRow(item, textSize, variant) }
- items.forEach { item ->
- val isPast = false
- if (item.type == "event") {
- TomorrowEventRow(item, zone, textSize)
- } else {
- TaskRow(item, textSize)
+ items.forEach { item ->
+ val isPast = false
+ if (item.type == "event") {
+ TomorrowEventRow(item, zone, textSize)
+ } else {
+ TaskRow(item, textSize)
+ }
}
- }
- fragments.forEach { frag ->
- frag.slots.forEach { slot -> TaskRow(slot.task, textSize) }
+ fragments.forEach { frag ->
+ frag.slots.forEach { slot -> TaskRow(slot.task, textSize) }
+ }
}
}