Anki is a smart spaced repetition flashcard program
Find a file
Damien Elmes 62223499c4 fix errors when undoing/redoing after a queue-invalidating operation
There were a few issues going on here:

- If some operation had invalidated the queues, they were subsequently
recreated with a call to .get_queues() in the undo handling code. This
could happen after the changes to the card had already been reverted,
leading to a queue state that didn't match our expectations.
- More generally, it's not safe to assume our mutations will apply
cleanly after the queue has been rebuilt. The next card will vary
depending on the number of remaining cards when interspersing cards of
different types, and a queue-invalidating operation will have changed
the learning cutoff.

So rather than rebuilding the queues on demand, we now check that they
already exist, and were created at the time we expect. If not, we
invalidate them and skip applying the mutations, and a subsequent
refresh of the UI should rebuild the queues correctly.

As part of this change, the cutoff snapshot has been moved into the
normal answer update object.

One possible downside here is that adding a note during review may cause
a newly due learning card to appear when undoing a different review.
If this proves to be a problem, we could potentially note down the
learning cutoff and apply it when queues are rebuilt later.
2021-08-22 15:32:46 +10:00
.buildkite use separate integration test for links 2021-07-24 10:12:25 +10:00
.github/ISSUE_TEMPLATE add issue template config.yml 2021-02-19 14:11:21 +10:00
cargo attempt to fix Linux build 2021-07-23 21:00:51 +10:00
docs Update proto format call in docs 2021-07-22 10:08:50 +02:00
ftl add options to v3 to preserve new card gather order 2021-08-20 12:03:32 +10:00
pip update to latest mypy 2021-06-16 16:04:59 +10:00
platforms add linux_arm64 platform 2020-12-29 18:40:39 +10:00
proto support limiting interday learning cards by review limit again 2021-08-22 15:32:46 +10:00
pylib show v3 scheduler in error info 2021-08-20 10:47:41 +10:00
qt avoid spurious warning in addcards startup 2021-08-20 11:37:23 +10:00
rslib fix errors when undoing/redoing after a queue-invalidating operation 2021-08-22 15:32:46 +10:00
scripts drop Rust Analyzer Bazel rule 2021-07-19 23:27:11 +10:00
ts Merge pull request #1335 from hikaru-y/fix-editor-fontfamily 2021-08-20 14:39:29 +10:00
.bazelignore initial Bazel conversion 2020-11-01 14:26:58 +10:00
.bazelrc use separate integration test for links 2021-07-24 10:12:25 +10:00
.bazelversion update pinned Bazel version to 4.0 release 2021-01-21 19:58:41 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore add script to run Rust Analyzer using Bazel's build products 2021-05-04 20:06:42 +10:00
bazel.bat initial Bazel conversion 2020-11-01 14:26:58 +10:00
BUILD.bazel drop Rust Analyzer Bazel rule 2021-07-19 23:27:11 +10:00
Cargo.lock Add links.rs for checking and building links 2021-07-22 10:03:03 +02:00
Cargo.toml add linkcheck to Bazel 2021-07-23 20:22:32 +10:00
CONTRIBUTORS Update CONTRIBUTORS 2021-07-20 12:36:18 +03:00
defs.bzl bump version 2021-08-19 22:10:45 +10:00
late_deps.bzl add script to run Rust Analyzer using Bazel's build products 2021-05-04 20:06:42 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
python.bzl use PYTHON_SYS_EXECUTABLE for setting path to Python 2020-12-23 21:53:13 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
repos.bzl update translations 2021-08-19 20:26:43 +10:00
run proper fix for __pycache__ folders preventing remove on ./run 2021-01-12 18:47:08 +10:00
run.bat enable Python warnings when running 2020-12-16 14:59:04 +10:00
WORKSPACE rename workspace 2021-07-10 23:58:53 +10:00

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/

For more information on building, please see Development.