Reader: debug 5-tap gesture to reset the Reader database#22807
Merged
Reader: debug 5-tap gesture to reset the Reader database#22807
Conversation
In debug builds, tapping the Reader tab 5 times within 2 seconds now shows a confirmation dialog. On confirm, the Reader database is reset and the Reader fragment is recreated so the current screen reloads with fresh data. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
Contributor
|
|
Contributor
|
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-Android into feature/reset-reader-db
5 tasks
adalpari
reviewed
Apr 22, 2026
Comment on lines
+266
to
+267
| readerDebugTapCount = if (now - readerDebugLastTapMs > READER_DEBUG_TAP_WINDOW_MS) 1 | ||
| else readerDebugTapCount + 1 |
Contributor
There was a problem hiding this comment.
The if-else indentation looks pretty weird 😅
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.


Description
While working on various reader PRs (such as #22808) I've often had to clear storage to reset the reader database, which means logging in again each time. So in this PR tapping the Reader tab 5 times within 2 seconds now shows a confirmation dialog to reset the Reader database.
This is a developer convenience to make it easy to exercise cold-start / fresh-DB paths without having to clear app data. Note that this is only enabled in debug builds.
Also includes a small crash fix in
ReaderTagsFeedFragment.removeCurrentPostListFragment()— guarding withisAddedso the method is safe when the fragment is no longer attached.Testing instructions
reset.mp4