Skip to content

fix(note-editor): handle 'Restore to Default' changing fields - #21577

Open
david-allison wants to merge 3 commits into
ankidroid:mainfrom
david-allison:fix-20510-notetype-restore-refresh
Open

fix(note-editor): handle 'Restore to Default' changing fields#21577
david-allison wants to merge 3 commits into
ankidroid:mainfrom
david-allison:fix-20510-notetype-restore-refresh

Conversation

@david-allison

Copy link
Copy Markdown
Member

Note

Assisted-by: Claude Fable 5

Fixes

Approach

Extract the refresh function, then call it on activity result

Also handle undo/redo in libAnki

How Has This Been Tested?

Unit tested

Learning

Matches upstream: pylib/anki/collection.py
ankitects/anki@9f3f6ba

Checklist

  • 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

Matches upstream: pylib/anki/collection.py
ankitects/anki@9f3f6ba

Partially fixes 20510

Assisted-by: Claude Fable 5
@david-allison
david-allison force-pushed the fix-20510-notetype-restore-refresh branch from aa47531 to 085d7cf Compare August 22, 2026 18:00
Restoring to default can update the fields in the note type.

The Note Editor now rebuilds the fields, preserving text where possible
(using the same code as when the spinner is changed)

Fixes 20510

Assisted-by: Claude Fable 5
@david-allison
david-allison force-pushed the fix-20510-notetype-restore-refresh branch from 085d7cf to 7414fca Compare August 22, 2026 18:30
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.

Restoring a note type to default doesn't update the fields

1 participant