refactor(libanki): modSchema documentation#20248
Merged
lukstbit merged 4 commits intoankidroid:mainfrom Feb 7, 2026
Merged
Conversation
**launchCatchingRequiringOneWaySync** - This didn't belong in the DeckPicker **userAcceptsSchemaChange()** - extract to a more centralized location **userAcceptsSchemaChange(col)** - delete; unused
Removed dead code Documented undo behaviour
Since we are no longer in Java, `ConfirmModSchemaException` is no longer a checked exception, so we can add in Anki's 'check' parameter Also improves documentation of the method Fixes 20246
… queue Renamed to launchCatchingRequiringOneWaySyncDiscardUndo For issue 20172
5 tasks
criticalAY
approved these changes
Feb 5, 2026
Contributor
criticalAY
left a comment
There was a problem hiding this comment.
Happy with it, don't see any issues
lukstbit
approved these changes
Feb 7, 2026
| */ | ||
| @LibAnkiAlias("mod_schema") | ||
| fun modSchema() { | ||
| fun modSchema(check: Boolean) { |
Member
There was a problem hiding this comment.
Not enough to block on it:
I'm not sure I like the check parameter name, throwIfUnchanged feels like a better name(maybe with a default value of true as well).
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.
Purpose / Description
This stems from a call to
withCol { modSchema() }in ChangeNoteTypeViewModel removing the undo queues.Further documentation of
modSchemawas requested.Fixes
Approach
db.execute()to log the undo queue removalmodSchemaandmodSchemaNoCheckHow Has This Been Tested?
Learning (optional, can help others)
DB.execute()will remove the undo and study queueschangeNotetypeOfNotesmodifies the schema, without any confirmation mechanismChecklist