112cbe8b59
Basic proof of concept, where the 'delete note' operation in the reviewer has been updated to use mw.perform_op(). Instead of manually calling .reset() afterwards, a summary of the changes is returned as part of the undo status query, and various parts of the GUI can listen to gui_hooks.operation_did_execute and decide whether they want to redraw based on the scope of the changes. This should allow the sidebar to selectively redraw just the tags area in the future for example. Currently we're just listing out all possible areas that might be changed; in the future we could theoretically inspect the specific changes in the undo log to provide a more accurate report (avoiding refreshing the tags list when no tags were added for example). You can test it out by opening the browse screen while studying, and then deleting the current card - the browser should update to show (deleted) on the cards due the earlier change. If going ahead with this, aside from updating all the screens that currently listen for resets, some thought will be required on how we can integrate it with legacy code that expects to called when resets are made, and expects to call .reset() when it makes changes. Thoughts? |
||
---|---|---|
.buildkite | ||
.github/ISSUE_TEMPLATE | ||
cargo | ||
docs | ||
ftl | ||
pip | ||
platforms | ||
pylib | ||
qt | ||
rslib | ||
scripts | ||
ts | ||
.bazelignore | ||
.bazelrc | ||
.bazelversion | ||
.gitattributes | ||
.gitignore | ||
bazel.bat | ||
BUILD.bazel | ||
Cargo.lock | ||
Cargo.toml | ||
CONTRIBUTORS | ||
defs.bzl | ||
late_deps.bzl | ||
LICENSE | ||
pkgkey.asc | ||
protobuf.bzl | ||
python.bzl | ||
README.md | ||
repos.bzl | ||
run | ||
run.bat | ||
WORKSPACE |
Anki
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.