Skip to content

Conversation

@Nishthajain7
Copy link
Contributor

Purpose / Description

Deprecate the NotetypeStorage.current() function and migrate all call sites to use defaultsForAdding()

Fixes

Approach

  • Added @deprecated annotation to NotetypeStorage.current()
  • Migrated all call sites to use defaultsForAdding()

How Has This Been Tested?

All existing tests pass without modification

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

@Nishthajain7 Nishthajain7 force-pushed the issue-19650 branch 2 times, most recently from 6d2eb34 to 09790ac Compare December 3, 2025 16:18
// test multiple cards - add another template
val noteType = col.notetypes.current()
val defaults = col.defaultsForAdding()
val noteType = col.notetypes.get(defaults.deckId)!!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failing test is: CollectionTest > test_noteAddDelete FAILED

@xenonnn4w
Copy link
Contributor

Thanks for your Contribution, some test are failing; fix them up!

@xenonnn4w xenonnn4w added the Needs Author Reply Waiting for a reply from the original author label Dec 3, 2025
@Nishthajain7
Copy link
Contributor Author

I've fixed them and all checks have passed

@david-allison
Copy link
Member

There's already an open PR for this (please check before working on an issue):

Both PRs need work, the one above has suggestions and is likely closer to completion, I'd propose closing this to aoid duplicating effrot.

@david-allison
Copy link
Member

I force pushed to #19656 to close this, truly sorry about the duplicated effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Author Reply Waiting for a reply from the original author New contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecation(libanki): move to col.defaultsForAdding

3 participants