Repository navigation
feat(links): don't ask again for a trusted website - #1735
Merged
Merged
Conversation
The "You're Leaving Flipcash" warning now has a "Don't ask again for <host>" box above Open Website. It starts unchecked, and the host is saved only when Open Website is tapped with it checked; Cancel or dismissing saves nothing. A saved host opens straight away next time. The host is the normalized ASCII one the warning shows, so a look-alike domain is saved as its xn-- form. Matching is exact: x.com does not cover mail.x.com. First-party hosts keep their own handling, and a link with no host (mailto:) isn't offered the box. The list lives in its own Preferences file next to app-settings: one list for the device, never synced, and not registered with resetStateForUser, so it outlives Log Out and Switch Accounts. Settings > Privacy always shows a Trusted Websites row under Blocked. The screen lists hosts newest first with Remove, and an empty list gets the same title-and-hint treatment as Blocked. BottomBarMessage gains an optional checkbox, drawn between the subtitle and the actions; existing messages are unchanged.
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.
The "You're Leaving Flipcash" warning had no way to remember a site, so every tap on a link to the same host asked again. This adds a "Don't ask again for " box above Open Website (design node
11230:13376), and a Settings › Privacy › Trusted Websites screen to undo it (node11230:67653). iOS is building the same thing in code-payments/code-ios-app#1028.Saving. The box starts unchecked every time. The host is saved only when Open Website is tapped with it checked; Cancel, dismissing, or unticking first saves nothing. Links with no host (
mailto:) still warn but aren't offered the box, since the label would read "Don't ask again for mailto".Matching. The saved host is the normalized ASCII one the warning already shows, so a look-alike domain is stored as its
xn--form. Matching is exact string equality:x.comdoes not covermail.x.com. First-party hosts are checked before the trusted list and keep their own handling.classifyLinktakes the trusted set as a parameter, soExternalLinksTeststays pure.Storage. One list per device in its own Preferences file (
trusted-websites) next toapp-settings, one key per host holding the date it was added. It's local only and not registered withAuthManager.resetStateForUser, so it survives Log Out and Switch Accounts.AuthManagerTestguards that. The contract (TrustedWebsites,LocalTrustedWebsites) lives in core becauseshared/appsettingsalready depends on core;MainActivityprovides the implementation.Settings. A Trusted Websites row sits under Blocked and always shows, with no count, to match iOS. The screen lists hosts newest first with "Added Oct 7"-style subtitles and an immediate Remove. An empty list gets the same title-and-hint layout as Blocked.
Bottom bar.
BottomBarMessagegains an optionalcheckbox(label plus a checked-state callback), drawn between the subtitle and the actions.showInfotakes it as an optional parameter; every existing message is unchanged.The empty-state hint copy ("Skip the “You're Leaving Flipcash” warning for a website by checking “Don't ask again” when you open its link") isn't in the design and may still change.