Show the notification permission prompt on every tab - #706
Merged
Conversation
The prompt row sits inside llApps, which is hidden whenever the Timeline or VPN tab is selected — and ActivityMain deliberately lands users on Timeline, both on first run and on return. A user who has not granted notification permissions therefore never sees the prompt unless they happen to open the Apps tab. Move it out of llApps, directly below the app bar, and let onCreate and onResume drive its visibility as they already do. The XML default goes from visible to gone to match: onCreate hides it unconditionally anyway, and a row this prominent should not flash before that runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 problem
tvNotifications— the tappable row prompting the user to grant notification permissions — lives insidellAppsinmain.xml. That container is hidden whenever the Timeline or VPN tab is selected, andActivityMaindeliberately lands users on Timeline:So a user who has not granted notification permissions never sees the prompt unless they happen to switch to the Apps tab. Confirmed on a Pixel 8 (Android 17): with
POST_NOTIFICATIONSrevoked, the row is absent on Timeline and present on Apps.This is pre-existing, unrelated to the local network work in #704; it was spotted while testing that branch on a device.
The change
Move the row out of
llApps, directly below the app bar, so it renders on every tab.onCreateandonResumealready drive its visibility and are untouched.The XML default changes from
visibletogoneto match:onCreatehides it unconditionally regardless, so nothing depended on the old default, and a row in this position should not flash before that runs.Testing
Built and installed on a Pixel 8 (Android 17, API 37). With
POST_NOTIFICATIONSrevoked, the prompt now appears on the Timeline tab on launch; granting it hides the row as before.Note on merge order
#704 moves
tvLocalNetworkto the same place. Whichever lands second will need a trivial conflict resolution inmain.xml— both rows belong outsidellApps, stacked below the app bar.