fix: rebuild timeline filter when contact list changes #1226
+138
−10
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.
Summary
Fixes #1225 - unfollowed accounts still showing up in feed.
The root cause was that timeline filters were built once from the contact list and never updated when users followed/unfollowed accounts. The profile page correctly showed the updated follow state because it queries the live
ContactState, but the timeline kept using the stale filter.Changes
Commit 1: filter: add contact_list_timestamp tracking to FilterStates
contact_list_timestampfield to track when filter was builtinvalidate()method to reset filter states for rebuildCommit 2: timeline: add reset methods for subscription and view cleanup
TimelineSub::reset(): Properly unsubscribes from ndb/relay pool before resettingTimelineTab::reset(): Clears cached notes and resets virtual listTimeline::reset_views(): Resets all view tabsCommit 3: timeline: rebuild filter when contact list changes
contact_list_needs_rebuild()helper to detect stale filtersis_timeline_ready()to check for contact list changes#[profiling::function]for performance monitoringTest plan
🤖 Generated with Claude Code