Skip to content

fix(calendar): restore week navigation for saved week view#1806

Open
Keegil wants to merge 2 commits intorunbox:masterfrom
Keegil:fix/issue-1541
Open

fix(calendar): restore week navigation for saved week view#1806
Keegil wants to merge 2 commits intorunbox:masterfrom
Keegil:fix/issue-1541

Conversation

@Keegil
Copy link
Copy Markdown

@Keegil Keegil commented Mar 27, 2026

Bug fix — Previous/Next navigation in the calendar advances by month instead of week when the saved view preference is Week.

Problem

When a user's calendar view preference was saved as Week, the toolbar's Previous/Next buttons navigated by month instead of week after the app reloaded. The Angular Calendar directive mwlView stayed at its default Month value because setView() only updated it when the stored preference changed — it did not apply the initial restored value. Issue #1541.

Root cause

setView() compared the new value against the current view property. When the app restored lastUsedView = Week from preferences, view became Week, but since setView() treated this as "no change", mwlView was never updated from its default Month. The toolbar directives read mwlView for navigation step size, so all navigation used month steps.

Fix

  • Synchronise mwlView whenever the calendar view is restored from preferences or changed by the user
  • Ensure the initial preference restoration sets both view and mwlView consistently

Testing

  • Regression spec added: restores week view from preferences and verifies the Next button advances by one week
  • npm run lint passes (existing repo-wide warnings only)

Closes #1541

Keep the Angular Calendar navigation mode in sync with the restored Runbox calendar view so Previous and Next advance by week when the user reopens calendar in week mode.

runbox#1541

Closes runbox#1541
@Keegil
Copy link
Copy Markdown
Author

Keegil commented Apr 2, 2026

Updated this to keep setView() unchanged and instead restore the saved calendar view directly from preferences, plus removed the changes.ts update. I also re-ran a TypeScript compile check locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Previous and next button in calendar will jump next/previous month instead of week.

2 participants