Skip to content

Comments

Fix SwiftUI RedditFilter button + Other Improvements#67

Open
NicholasBly wants to merge 11 commits intolevel3tjg:masterfrom
NicholasBly:master
Open

Fix SwiftUI RedditFilter button + Other Improvements#67
NicholasBly wants to merge 11 commits intolevel3tjg:masterfrom
NicholasBly:master

Conversation

@NicholasBly
Copy link
Contributor

This PR restores access to the RedditFilter settings menu on newer app versions (SwiftUI) and implements significant performance and logic fixes. Currently tested on latest Reddit app build 2026.06 with .ipa build available in my Releases tab.

Changes

Restored Settings UI Access to RedditFilter UI

Replaced the hook for the removed AppSettingsViewController with a UIViewController hook that detects the new SwiftUI Settings page (RedditSliceKit).

Performance Optimizations

Caching: Implemented NSCache for iconWithName and localizedString to eliminate expensive bundle iteration on every cell render, improving scrolling performance.

Filter Logic: optimized shouldFilterObject to check NSUserDefaults before performing expensive class introspection. If a filter is disabled, the tweak now skips that type entirely.

Bug Fixes

Initialization: Fixed a copy-paste error in %ctor where default settings for Recommended, NSFW, and Awards were incorrectly checking the kRedditFilterPromoted key.

Memory Leak: Added a check in ToggleImageTableViewCell to ensure constraints are only added once per reuse cycle, preventing a memory leak and layout warnings.

Safety: Added error handling for NSJSONSerialization in the network hook to prevent potential crashes.

@dwojc6
Copy link

dwojc6 commented Feb 13, 2026

Not sure if something is different on my end but the descriptions in my settings page for the tweak are all blank
IMG_2646

@NicholasBly
Copy link
Contributor Author

Not sure if something is different on my end but the descriptions in my settings page for the tweak are all blank

Looks like missing localizable strings. If you injected the dylib using sideloadly or similar that can happen. Need to buildthe ipa directly with GitHub actions or locally.

It's working for me with the built ipa in releases and installing with Signulous.

@dwojc6
Copy link

dwojc6 commented Feb 13, 2026

Not sure if something is different on my end but the descriptions in my settings page for the tweak are all blank

Looks like missing localizable strings. If you injected the dylib using sideloadly or similar that can happen. Need to buildthe ipa directly with GitHub actions or locally.

It's working for me with the built ipa in releases and installing with Signulous.

Gotcha, I built your fork with theos and injected the deb so that could be why

dwojc6 and others added 4 commits February 13, 2026 12:48
   - Added after-stage hook to copy bundle resources
   - Ensures Root.strings file is included in .deb
   - Fixes blank settings labels issue
Fix: Include localizable strings in deb package
Schema Paths + optimizations

Add Reddit filter preferences and improve filtering logic for posts and comments.
@NicholasBly
Copy link
Contributor Author

@dwojc6 I implemented your pull request for the localizable strings fix and released 1.1.9 on my own fork which adds significant filtering optimizations.

I have been developing a youtube LG webOS app which also uses JSON filtering and have adopted fast path filtering here along with several optimizations. From my testing the app loads a lot quicker and page switching also loads nearly instantly.

One bug I had with 1.1.8 and earlier was that sometimes the scrolling with suddenly stop as if there's no more posts to load. From testing I haven't run into this yet and don't know what causes it but needs more testing if its a Reddit issue or a tweak issue.

I'm also thinking about adding a Muted Word feature to the list of available filter settings.

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