Skip to content

Fix #818: Revert to using canAddNotes#827

Merged
jamesmaa merged 1 commit intoyomidevs:masterfrom
eloyrobillard:revert-to-can-add-notes
Apr 16, 2024
Merged

Fix #818: Revert to using canAddNotes#827
jamesmaa merged 1 commit intoyomidevs:masterfrom
eloyrobillard:revert-to-can-add-notes

Conversation

@eloyrobillard
Copy link
Copy Markdown

@eloyrobillard eloyrobillard commented Apr 16, 2024

Fixes #818.

Reverting to using canAddNotes to avoid issues for users with older AnkiConnect version not supporting canAddNotesWithErrorDetail (introduced in 24.1.21.0).

Test plan

To simulate the original issue:

  • go to the files for your installed AnkiConnect (Anki2/addons21/2055492159, can be reached from Anki by going to Add-ons > AnkiConnect > Show files)
  • in __init__.py, comment out the canAddNotesWithErrorDetail method from line 791 to 801 in the latest version
  • using Yomitan, try to add a note for a term with duplicate notes in Anki
    • make sure Check for card duplicates is on in the Yomitan settings
  • the red stacked add button should appear (same as if you uncomment the above code)

@eloyrobillard eloyrobillard requested a review from a team as a code owner April 16, 2024 12:25
@github-actions
Copy link
Copy Markdown

✔️ No visual differences introduced by this PR.

View Playwright Report (note: open the "playwright-report" artifact)

Copy link
Copy Markdown
Member

@Kuuuube Kuuuube left a comment

Choose a reason for hiding this comment

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

Looks good, works in my testing.

Copy link
Copy Markdown
Collaborator

@jamesmaa jamesmaa left a comment

Choose a reason for hiding this comment

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

My fairly rubberstamp approval. LGTM

@jamesmaa jamesmaa added this pull request to the merge queue Apr 16, 2024
Merged via the queue into yomidevs:master with commit 643caf0 Apr 16, 2024
@Kuuuube Kuuuube added kind/bug The issue or PR is regarding a bug area/anki The issue or PR is related to Anki integration labels Apr 16, 2024
github-merge-queue bot pushed a commit that referenced this pull request Apr 16, 2024
* added Old Irish (SGA)

* Merge Yomitan Updates (#1)

* fix (#811)

* Add scanOnTouchTap and improve touch scanning defaults (#791)

* Add scanOnTouchTap

* Update version to 30

* Cleanup if statement

* log anki error when hiding button (#821)

* Fix noteInfos not getting assigned (#819)

* improve term sorting (#806)

* improve term sorting

* edge case

* fix: add missing handlebar entry (#823)

* fix: add missing handlebar entry

* fix: add new handlebar to tests

* Revert to using canAddNotes (#827)

Fix #818

* Remove unused canAdd (#824)

Co-authored-by: James Maa <jamesmaa@Jamess-MacBook-Pro.local>

* Fix duplicate check not working across note types (#830)

* Fix duplicate check not working across note types

* Add invalidNoteId

---------

Co-authored-by: James Maa <jmaa@berkeley.edu>

---------

Co-authored-by: StefanVukovic99 <stefanvukovic44@gmail.com>
Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com>
Co-authored-by: m-edlund <me@fwegmann.com>
Co-authored-by: Eloy Robillard <eloy.robillard@gmail.com>
Co-authored-by: James Maa <jmaa@berkeley.edu>
Co-authored-by: James Maa <jamesmaa@Jamess-MacBook-Pro.local>

* Revert "Merge Yomitan Updates (#1)"

This reverts commit 748dc22.

* Fix Static Analysis Error

* Fix eslint erro

---------

Co-authored-by: martholomew <martholomew@users.noreply.github.com>
Co-authored-by: StefanVukovic99 <stefanvukovic44@gmail.com>
Co-authored-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com>
Co-authored-by: m-edlund <me@fwegmann.com>
Co-authored-by: Eloy Robillard <eloy.robillard@gmail.com>
Co-authored-by: James Maa <jmaa@berkeley.edu>
Co-authored-by: James Maa <jamesmaa@Jamess-MacBook-Pro.local>
@genednzl
Copy link
Copy Markdown

Hey guys im not that technical, it seems like you guys found a fix but im not sure how to implement the fix?

@Kuuuube
Copy link
Copy Markdown
Member

Kuuuube commented Apr 17, 2024

Hey guys im not that technical, it seems like you guys found a fix but im not sure how to implement the fix?

You dont. Update yomitan and the fix will be there.

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

Labels

area/anki The issue or PR is related to Anki integration kind/bug The issue or PR is regarding a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The green add button just dissapeared.

4 participants