Android home-screen widget: top-3 next actions (4x2 'Next up' card) — tap the priority ring to complete via the offline queue, rows deep-link to Clarify, + opens capture; redraws on every store change plus a 30-min self-refresh
Some checks failed
Build & Release APK / build (push) Failing after 24s
Some checks failed
Build & Release APK / build (push) Failing after 24s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
14
app/src/widget/render.tsx
Normal file
14
app/src/widget/render.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
"use no memo";
|
||||
// One source of truth for what the widget shows: the same selectors the home
|
||||
// screen uses, so widget and app always agree on the top three.
|
||||
import { getState, todayTasks, visibleTasksByStatus } from "../lib/store";
|
||||
import { NextUpWidget } from "./NextUpWidget";
|
||||
|
||||
/** Must match the widget `name` in app.json's react-native-android-widget plugin config. */
|
||||
export const WIDGET_NAME = "NextUp";
|
||||
|
||||
export function renderNextUpWidget() {
|
||||
const s = getState();
|
||||
const next = visibleTasksByStatus(s, "next");
|
||||
return <NextUpWidget tasks={next.slice(0, 3)} totalNext={next.length} overdueCount={todayTasks(s).overdue.length} />;
|
||||
}
|
||||
Reference in New Issue
Block a user