-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
NF: rename m to noteType
#18112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NF: rename m to noteType
#18112
Conversation
david-allison
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't match upstream
| val noteType = this@Card.noteType(col) | ||
| return if (noteType.isStd) { | ||
| noteType.tmpls[ord] | ||
| } else { | ||
| noteType(col).tmpls[0] | ||
| this@Card.noteType(col).tmpls[0] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
! This looks like a minor performance issue upstream, but it doesn't match
noteType is ONLY used inside the if
def template(self) -> TemplateDict:
notetype = self.note_type()
if notetype["type"] == MODEL_STD:
return self.note_type()["tmpls"][self.ord]
else:
return self.note_type()["tmpls"][0]There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I corrected this upstream https://github.com/ankitects/anki/blob/d52889f45c3f7999a45fd2dde367f79f3bc3bad4/pylib/anki/cards.py#L175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not updated to follow the new code of the upstream method.
As AnkiDroid wants to be similar to Anki, instead of making AnkiDroid slightly less efficient, I prefer to slightly improve Anki. AnkiDroid related PR: ankidroid/Anki-Android#18112.
As AnkiDroid wants to be similar to Anki, instead of making AnkiDroid slightly less efficient, I prefer to slightly improve Anki. AnkiDroid related PR: ankidroid/Anki-Android#18112.
d0edeb4 to
1c0d753
Compare
|
Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically |
lukstbit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this got stale I decided to fix it to move things along.
Some more part of #17598