From 2509dde6aa372a505b186657706f4d21bd391807 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 12 Aug 2026 23:35:47 +0000 Subject: Add task title editing/deletion, timeline click-to-open, widget app launch Task-detail modal was description-only with no delete affordance; HandleUpdateTask now saves the title too and a Delete button hits a new DELETE /tasks/{id} route backed by store.DeleteNativeTask, which repairs chain_position/unlocks the successor when the deleted task belongs to a chain. Timeline tab task/card/gtask rows now open the same detail modal as the Tasks tab. Android widget's "TODAY" header is now a tap target that launches DashboardActivity, since nothing previously opened the full app from the widget. --- .../app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'android/app/src/main/java/org') diff --git a/android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt b/android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt index 9793eb9..a11a7e3 100644 --- a/android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt +++ b/android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt @@ -1,12 +1,15 @@ package org.terst.doot.widget.ui import android.content.Context +import android.content.Intent import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.datastore.preferences.core.Preferences import androidx.glance.* +import androidx.glance.action.clickable import androidx.glance.appwidget.GlanceAppWidget +import androidx.glance.appwidget.action.actionStartActivity import androidx.glance.appwidget.lazy.LazyColumn import androidx.glance.appwidget.provideContent import androidx.glance.layout.* @@ -146,10 +149,16 @@ fun WidgetRoot( .padding(horizontal = 8.dp, vertical = 4.dp) ) { item { + val context = LocalContext.current + val openAppIntent = Intent(context, DashboardActivity::class.java).apply { + addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + } Row( modifier = GlanceModifier.fillMaxWidth().padding(bottom = 4.dp), verticalAlignment = Alignment.CenterVertically ) { + // "TODAY" is the widget's only unclaimed tap target (every task/event row + // already opens something of its own) so it doubles as "open the app". ShadowedText( "${moonPhaseEmoji(todayDate)} TODAY", style = TextStyle( @@ -158,7 +167,7 @@ fun WidgetRoot( fontWeight = textSize.scaledHeaderWeight(FontWeight.Bold) ), haloColor = palette.haloColor, - modifier = GlanceModifier.defaultWeight() + modifier = GlanceModifier.defaultWeight().clickable(actionStartActivity(openAppIntent)) ) budgetStatus?.today?.let { today -> if (today.scheduledMinutes > 0) { -- cgit v1.2.3