Skip to content

feat(instagram): reflect effective toggle state in About patch list - #1835

Open
jhult wants to merge 3 commits into
crimera:devfrom
jhult:refactor/insta-about-patch-list
Open

feat(instagram): reflect effective toggle state in About patch list#1835
jhult wants to merge 3 commits into
crimera:devfrom
jhult:refactor/insta-about-patch-list

Conversation

@jhult

@jhult jhult commented Sep 5, 2026

Copy link
Copy Markdown

Summary

The About patch list previously reported only whether each patch was compiled in, which never changes after install. This branch makes it reflect the effective state: the patch applied AND its toggles are currently on.

Changes

  • Effective status: About entries now report flag AND toggle(s) so a user's current preference is reflected instead of static compile-in status.
  • Live refresh: the status map is re-derived every time the About screen is opened, so toggle changes appear without restarting.
  • effective() helper: centralizes the flag/toggle AND logic, replacing hand-written flag && SharedPref.getBooleanPref(...) expressions.
  • Refactor: aboutSection() now builds its own status map via loadStatusMap() instead of receiving and mutating the shared FLAGS map from the caller (removed the now-unused TreeMap parameter).
  • Fixes: loadStatusMap() builds a fresh map, so keys dropped from the patch set no longer linger in the About list.

Verification

  • :extensions:instagram:compileDebugJavaWithJavac — passes
  • :extensions:instagram:assembleDebug — passes
  • Unit tests: module has no unit tests (NO-SOURCE)

Note: AI assisted in creating this fix and this pull request.

The patch was never added to the SettingsStatus flags map, so it was missing from the About screen's patch info list unlike every other applied patch.
View live anonymously was registered under the More profile options key and Disable screenshot detection under the View live anonymously key, so both rows displayed the wrong patch status. Duplicate puts also let Stories audio autoplay overwrite the Enable more options on post row via last-write-wins on the shared TreeMap key.
Show the effective state (patch applied AND its toggles on) rather than compile-in status, refreshing the map each time the About screen is opened. Add an effective() helper for flag/toggle AND logic, and have aboutSection() build the map itself instead of receiving and mutating the shared FLAGS map from the caller.
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