Skip to content

Fix first filter being wiped after a cached launch - #39

Merged
AdvayMonga merged 1 commit into
mainfrom
fix/filter-reset-on-cached-launch
Sep 21, 2026
Merged

AdvayMonga merged 1 commit into
mainfrom
fix/filter-reset-on-cached-launch

Conversation

@AdvayMonga

Copy link
Copy Markdown
Owner

Bug

Open the app (feed loads instantly from the disk cache) → Filter → pick Vegan → Apply. The overlay closes but the feed is unfiltered. Applying a second time works.

Cause

loadMenus() syncs the session filters from profile prefs once per session, but that block sat after the "already loaded" guard. A cached launch returns at the guard, so the sync ran on the next load instead, the one triggered by Apply, and overwrote the just-selected filters with profile defaults.

Fix

Run the sync before the cache check. iOS only; no API change.

Verified

Simulator, fresh guest: before the fix the feed still led with Buffalo Chicken Pizza after applying Vegan; after the fix it shows only vegan dishes and the filter badge.

🤖 Generated with Claude Code

loadMenus() synced the session filters from profile prefs only after the
"already loaded" guard. A launch served from the disk cache returned at
that guard, so the sync ran on the next load instead, which is the one
triggered by Apply Filters, and overwrote the filter the user had just
picked. Sync before the cache check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@AdvayMonga
AdvayMonga merged commit 74fdf31 into main Sep 21, 2026
1 check passed
@AdvayMonga
AdvayMonga deleted the fix/filter-reset-on-cached-launch branch September 22, 2026 20:03
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.

1 participant