feat(Instagram): Add Focus Lock patch - #1928
Conversation
938ebb9 to
b82d34f
Compare
|
What about app uninstallation and reinstall ?? Will this surpass the mode ?? |
|
@vippium yes. Uninstalling and reinstalling clears the app's shared preferences, so the lock goes with it. Moving the system clock forward does the same. That is by design rather than something I tried to close. The patch can only add friction, because the data lives inside the app it is patching. What it does cover is the impulse path, which is the one that actually gets used at 11pm: flipping the switch back, resetting Piko settings, or importing an older settings file. A hard stop needs something outside the app. |
395d65d to
bdd82dd
Compare
|
Fixed the deep link bug. Confirmed working on device. The branch is squashed into a single commit. |
Commitment mode for cutting down on Instagram usage. The user picks what to block (Reels, Explore) and a duration (1 day to 3 months). While locked: - The Reels tab is removed from the navigation bar and Reels scrolling is disabled. Reels shared with you in a DM, story or notification still open - Explore is disabled (optional) - The enforced switches are shown checked and greyed out in settings, without writing to the stored value, so the user's own choices return afterwards - Reset settings and import settings are refused, since either would drop the lock Unlocking early requires requesting an unlock and waiting a 24 hour cooling-off period before confirming, so the decision cannot be made on impulse. Blocked URIs are logged when Piko debug is on.
bdd82dd to
87a8e5c
Compare
|
lgtm |
|
thanks for the merge. opened #1953 as a follow up, it lets the lock hold any distraction free setting instead of just reels and explore. |
## [3.10.0-personal.4](v3.10.0-personal.3...v3.10.0-personal.4) (2026-09-27) ### 🐛 Bug Fixes * **Instagram:** add auto-scroll persistence flag to recommended flags ([crimera#1957](https://github.com/Xiaorui-Huang/piko/issues/1957)) ([096ea87](096ea87)), closes [crimera#1746](https://github.com/Xiaorui-Huang/piko/issues/1746) * **Instagram:** invoke reflected methods on the correct receiver ([crimera#1960](https://github.com/Xiaorui-Huang/piko/issues/1960)) ([e4a9464](e4a9464)) * **Instagram:** remove forced HDR brightness on photos and Reels ([crimera#1955](https://github.com/Xiaorui-Huang/piko/issues/1955)) ([0084136](0084136)), closes [crimera#1817](https://github.com/Xiaorui-Huang/piko/issues/1817) * **Instagram:** Restore skip-and-toast when a download already exists ([50d0b6b](50d0b6b)), closes [crimera#1923](https://github.com/Xiaorui-Huang/piko/issues/1923) ### ✨ New Features * **Instagram:** Add `Focus Lock` patch ([crimera#1928](https://github.com/Xiaorui-Huang/piko/issues/1928)) ([2b6b5ac](2b6b5ac)) * **Instagram:** Add download buttons to Reels and Stories ([a5ad0da](a5ad0da))
Summary
Adds a Focus Lock patch for Instagram. It is aimed at people who turn Reels off and then keep turning them back on.
You pick what to block (Reels, Explore) and how long for, from 1 day up to 3 months, then press Lock now. While the lock is on:
To unlock early you press Request unlock, wait 24 hours, then confirm. A pending request can be cancelled.
Notes
FocusLockholds the lock state. Enforcement is OR-ed into the existingPrefgetters, so nothing in the existing patches changes shape.NavigationBarPatch.applyFocusLock, after the config is saved, so the user's saved layout is left alone./api/v1/clips/discover/stream/serves both the Reels tab and a single shared reel, so blocking it breaks reels opened from a story or the notifications tab.Test plan
Tested on a patched Instagram build:
buildAndroidpasses on top ofdev