Skip to content

fix: avoid anchoring reviewer snackbar to hidden answer buttons#20958

Merged
BrayanDSO merged 1 commit intoankidroid:mainfrom
criticalAY:fix/snackbar-error
May 6, 2026
Merged

fix: avoid anchoring reviewer snackbar to hidden answer buttons#20958
BrayanDSO merged 1 commit intoankidroid:mainfrom
criticalAY:fix/snackbar-error

Conversation

@criticalAY
Copy link
Copy Markdown
Contributor

Purpose / Description

In FullScreenMode.FULLSCREEN_ALL_GONE, the answer buttons layout is animated to View.GONE when the system UI auto-hides. Snackbars shown during that window (e.g. via undoAndShowSnackbar) anchored to the hidden view and tripped the visibility check in showSnackbar. Guard the anchor with takeIf { it.isVisible }, mirroring the fixapplied to DeckPicker in #20766.

Fixes

Approach

NA

How Has This Been Tested?

Google emulator API 35, I have verified it doesnt occur in new study screen only in old one

Learning (optional, can help others)

NA

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@criticalAY
Copy link
Copy Markdown
Contributor Author

@david-allison AbstractFlashcardViewer.kt will be gone when we finally enable new SS and get rid of this one (No action needed)

@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels May 6, 2026
@BrayanDSO BrayanDSO added this pull request to the merge queue May 6, 2026
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) Queued for Cherry Pick to Stable Branch and removed Needs Second Approval Has one approval, one more approval to merge labels May 6, 2026
Merged via the queue into ankidroid:main with commit 8cf1ceb May 6, 2026
19 checks passed
@github-actions github-actions Bot added this to the 2.25 release milestone May 6, 2026
@github-actions github-actions Bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 2.24: undoAndShowSnackbar - anchorView was not visible

3 participants