fix(calendar): restore week navigation for saved week view#1806
Open
Keegil wants to merge 2 commits intorunbox:masterfrom
Open
fix(calendar): restore week navigation for saved week view#1806Keegil wants to merge 2 commits intorunbox:masterfrom
Keegil wants to merge 2 commits intorunbox:masterfrom
Conversation
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
castaway
requested changes
Apr 2, 2026
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mwlViewstayed at its defaultMonthvalue becausesetView()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 currentviewproperty. When the app restoredlastUsedView = Weekfrom preferences,viewbecameWeek, but sincesetView()treated this as "no change",mwlViewwas never updated from its defaultMonth. The toolbar directives readmwlViewfor navigation step size, so all navigation used month steps.Fix
mwlViewwhenever the calendar view is restored from preferences or changed by the userviewandmwlViewconsistentlyTesting
npm run lintpasses (existing repo-wide warnings only)Closes #1541