diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-12 23:35:47 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-12 23:35:47 +0000 |
| commit | 2509dde6aa372a505b186657706f4d21bd391807 (patch) | |
| tree | e4147991747b8dd14d0b8654b2b8e50717b666bd /android/app/src/main | |
| parent | 3e8ad60431d6cc783f9f7c555bfde5db54ebec75 (diff) | |
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.
Diffstat (limited to 'android/app/src/main')
| -rw-r--r-- | android/app/src/main/java/org/terst/doot/widget/ui/DootWidget.kt | 11 |
1 files changed, 10 insertions, 1 deletions
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) { |
