Skip to content

fix: crash when showing snackbar after removing deck in widget config#20315

Merged
lukstbit merged 1 commit intoankidroid:mainfrom
xenonnn4w:deckpickerconfigcrash
Feb 11, 2026
Merged

fix: crash when showing snackbar after removing deck in widget config#20315
lukstbit merged 1 commit intoankidroid:mainfrom
xenonnn4w:deckpickerconfigcrash

Conversation

@xenonnn4w
Copy link
Contributor

@xenonnn4w xenonnn4w commented Feb 9, 2026

Purpose / Description

The baseSnackbarBuilder always anchored the snackbar to the FAB, even when updateFabVisibility() had already hidden it. In debug builds this threw IllegalArgumentException ("anchorView was notvisible").

Fixes

Approach

Only anchor to the FAB when it is actually visible; otherwise fall back to default positioning.

How Has This Been Tested?

Tested by adding n number of decks( given n are maximum number of decks present) and adding all of them in the widget, then removing any one.

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

Only anchor to the FAB when it is actually visible; otherwise
fall back to default positioning.
@xenonnn4w xenonnn4w added Widget Review High Priority Request for high priority review labels Feb 9, 2026
@lukstbit lukstbit added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Review labels Feb 11, 2026
@lukstbit lukstbit added this pull request to the merge queue Feb 11, 2026
Merged via the queue into ankidroid:main with commit 9e5137e Feb 11, 2026
19 checks passed
@github-actions github-actions bot added this to the 2.24 release milestone Feb 11, 2026
@github-actions github-actions bot removed Review High Priority Request for high priority review Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) labels Feb 11, 2026
@xenonnn4w xenonnn4w deleted the deckpickerconfigcrash branch February 11, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when deleting a deck from the widget configuration screen

2 participants