Skip to content

Conversation

@thunderxx2
Copy link

Summary

This PR implements a new user preference to filter out posts containing media attachments from the timeline, as requested in issue #2382.

Changes

  • Env: Added hidePostsWithMedia to UserPreferences using @AppStorage for persistent state management.
  • Settings: Integrated a new Toggle in ContentSettingsView.swift allowing users to enable/disable media filtering.
  • Timeline:
    • Implemented filtering logic in TimelineDatasource.swift to exclude media-heavy posts during new status fetches.
    • Updated TimelineListView.swift to reactively filter the current display list, ensuring posts disappear/reappear instantly when the setting is toggled.
  • Localization: Added settings.content.media.hide-posts-with-media to Localizable.xcstrings with support for multiple English locales (en, en-GB, ca).

Impact

Users who prefer a text-only or low-bandwidth experience can now hide all media-based posts across their timelines.

Screenshots / Video

Settings Toggle Filtered Timeline
Settings Toggle #2383_screenshot

Testing Performed

  • Verified that the toggle state persists after app restart.
  • Confirmed that posts with images/video are removed instantly when the toggle is enabled.
  • Verified that new incoming posts are filtered correctly while the setting is active.
  • Tested on iPhone 16 Simulator (iOS 18).

Closes #2382

@thunderxx2 thunderxx2 force-pushed the feat/hide-media-posts-v2 branch from 827648b to ffb2759 Compare December 29, 2025 21:07
@Dimillian
Copy link
Owner

image Hmmm ? I think you need to do localization as part of another PR and be careful not to break or change the file formatting

@thunderxx2
Copy link
Author

thunderxx2 commented Jan 2, 2026

image Hmmm ? I think you need to do localization as part of another PR and be careful not to break or change the file formatting

Hi @Dimillian ,

I've moved the localization to a separate PR here: [/pull/2406]. This PR is now strictly focused on the filtering logic. Ready for review!

@thunderxx2 thunderxx2 force-pushed the feat/hide-media-posts-v2 branch from 9e6a69e to 01e3783 Compare January 2, 2026 13:35
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.

Feature request: Toggle to hide posts containing any sort of media

2 participants