From 2e13528c6bacc6baf0d3bcd11282355a78d75a3f Mon Sep 17 00:00:00 2001 From: le king fu Date: Thu, 12 Mar 2026 20:10:45 -0400 Subject: [PATCH] fix: default widget period to all tasks (#23) Change default widgetPeriodWeeks from 2 to 0 (all tasks) so that the issue is resolved out of the box without requiring the user to discover the new setting. Co-Authored-By: Claude Opus 4.6 --- src/services/widgetSync.ts | 4 ++-- src/stores/useSettingsStore.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/widgetSync.ts b/src/services/widgetSync.ts index 509ddd0..c5cf4c1 100644 --- a/src/services/widgetSync.ts +++ b/src/services/widgetSync.ts @@ -36,7 +36,7 @@ export async function syncWidgetData(): Promise { const todayStart = startOfDay(now); // Read widget period setting from AsyncStorage (0 = all, N = N weeks ahead) - let widgetPeriodWeeks = 2; + let widgetPeriodWeeks = 0; try { const settingsRaw = await AsyncStorage.getItem('simpl-liste-settings'); if (settingsRaw) { @@ -45,7 +45,7 @@ export async function syncWidgetData(): Promise { if (typeof stored === 'number') widgetPeriodWeeks = stored; } } catch { - // Default to 2 weeks + // Default to all tasks } const selectFields = { diff --git a/src/stores/useSettingsStore.ts b/src/stores/useSettingsStore.ts index f22d0a2..c9998df 100644 --- a/src/stores/useSettingsStore.ts +++ b/src/stores/useSettingsStore.ts @@ -27,7 +27,7 @@ export const useSettingsStore = create()( notificationsEnabled: true, reminderOffset: 0, calendarSyncEnabled: false, - widgetPeriodWeeks: 2, + widgetPeriodWeeks: 0, setTheme: (theme) => set({ theme }), setLocale: (locale) => set({ locale }), setNotificationsEnabled: (notificationsEnabled) => set({ notificationsEnabled }),