Skip to content

Comments

Fix bookmarks tab not reflecting group changes on tab switch#1055

Merged
aaronbrethorst merged 1 commit intoOneBusAway:mainfrom
diveshpatil9104:fix/sync-bookmarks-tab-after-group-changes
Feb 22, 2026
Merged

Fix bookmarks tab not reflecting group changes on tab switch#1055
aaronbrethorst merged 1 commit intoOneBusAway:mainfrom
diveshpatil9104:fix/sync-bookmarks-tab-after-group-changes

Conversation

@diveshpatil9104
Copy link
Contributor

Description

Problem

When a user adds, deletes, or renames a bookmark group on the Groups tab and then switches to the Bookmarks tab, the changes don't appear. The bookmarks tab keeps showing the old group state until the user moves a bookmark, which happens to trigger a form reload internally.

Root Cause

toggleControllers() was missing two steps when switching from Groups → Bookmarks:

  1. Group changes weren't persisted to userDataStore — that only happened on modal dismiss.
  2. The bookmarks form was never rebuilt — it was built once in viewDidLoad and never refreshed.

Fix

Files Changed

File Change
ManageBookmarksAndGroupsViewController.swift Persist groups + trigger reload on tab switch
ManageBookmarksViewController.swift Add reloadFormFromStore(), deduplicate moveRowAt

Before (Bug) | After (Fixed)

Before (Bug) After (Fixed)
issue.mov
fix.mov
Bookmarks tab shows stale group sections after adding/deleting/renaming groups Bookmarks tab immediately reflects current group state on tab switch

Copy link
Member

@aaronbrethorst aaronbrethorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Divesh — sharp diagnosis on this one. The root cause analysis is spot on: group changes weren't being persisted until viewWillDisappear, so the Bookmarks tab had no way to see them on a mid-session tab switch. Calling updateModelState() before the swap and then reloadFormFromStore() after is exactly the right fix. Extracting the deferred reload into its own method also cleans up the existing moveRowAt code nicely. This looks good to merge!

@aaronbrethorst aaronbrethorst merged commit 7024937 into OneBusAway:main Feb 22, 2026
2 checks passed
@diveshpatil9104 diveshpatil9104 deleted the fix/sync-bookmarks-tab-after-group-changes branch February 23, 2026 02:41
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.

2 participants