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 <noreply@anthropic.com>
This commit is contained in:
le king fu 2026-03-12 20:10:45 -04:00
parent f040ec7902
commit 2e13528c6b
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ export async function syncWidgetData(): Promise<void> {
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<void> {
if (typeof stored === 'number') widgetPeriodWeeks = stored;
}
} catch {
// Default to 2 weeks
// Default to all tasks
}
const selectFields = {

View file

@ -27,7 +27,7 @@ export const useSettingsStore = create<SettingsState>()(
notificationsEnabled: true,
reminderOffset: 0,
calendarSyncEnabled: false,
widgetPeriodWeeks: 2,
widgetPeriodWeeks: 0,
setTheme: (theme) => set({ theme }),
setLocale: (locale) => set({ locale }),
setNotificationsEnabled: (notificationsEnabled) => set({ notificationsEnabled }),