feat(instagram): reflect effective toggle state in About patch list - #1835
Open
jhult wants to merge 3 commits into
Open
feat(instagram): reflect effective toggle state in About patch list#1835jhult wants to merge 3 commits into
jhult wants to merge 3 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
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
flag AND toggle(s)so a user's current preference is reflected instead of static compile-in status.effective()helper: centralizes the flag/toggle AND logic, replacing hand-writtenflag && SharedPref.getBooleanPref(...)expressions.aboutSection()now builds its own status map vialoadStatusMap()instead of receiving and mutating the sharedFLAGSmap from the caller (removed the now-unusedTreeMapparameter).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— passesNO-SOURCE)