Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Arthur-Milchior
Copy link
Member

@Arthur-Milchior Arthur-Milchior commented Mar 16, 2025

Copy link
Member

@david-allison david-allison left a 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

Comment on lines 216 to 221
val noteType = this@Card.noteType(col)
return if (noteType.isStd) {
noteType.tmpls[ord]
} else {
noteType(col).tmpls[0]
this@Card.noteType(col).tmpls[0]
}
Copy link
Member

@david-allison david-allison Mar 16, 2025

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

https://github.com/ankitects/anki/blob/14dc979e448dbf1c18c63fca64a37cce66689503/pylib/anki/cards.py#L173-L178

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]

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Mar 16, 2025
Arthur-Milchior added a commit to Arthur-Milchior/anki that referenced this pull request Mar 16, 2025
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.
@Arthur-Milchior Arthur-Milchior marked this pull request as draft March 17, 2025 02:06
abdnh pushed a commit to ankitects/anki that referenced this pull request Mar 19, 2025
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.
@Arthur-Milchior Arthur-Milchior force-pushed the m branch 2 times, most recently from d0edeb4 to 1c0d753 Compare March 23, 2025 02:32
@Arthur-Milchior Arthur-Milchior removed the Needs Author Reply Waiting for a reply from the original author label Mar 23, 2025
@Arthur-Milchior Arthur-Milchior marked this pull request as ready for review March 23, 2025 02:32
@lukstbit lukstbit added the Needs Author Reply Waiting for a reply from the original author label Mar 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2025

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

@github-actions github-actions bot added the Stale label Apr 6, 2025
Copy link
Member

@lukstbit lukstbit left a 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.

@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge and removed Needs Author Reply Waiting for a reply from the original author Stale labels Apr 7, 2025
@david-allison david-allison added this pull request to the merge queue Apr 9, 2025
@lukstbit lukstbit removed this pull request from the merge queue due to a manual request Apr 10, 2025
@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 Second Approval Has one approval, one more approval to merge labels Apr 10, 2025
@lukstbit lukstbit added this pull request to the merge queue Apr 10, 2025
Merged via the queue into ankidroid:main with commit db8d29b Apr 10, 2025
9 checks passed
@github-actions github-actions bot added this to the 2.21 release milestone Apr 10, 2025
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Apr 10, 2025
@Arthur-Milchior Arthur-Milchior deleted the m branch April 10, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants