Anki/rslib/src
Damien Elmes 1e849316be more reset refactoring
'card modified' covers the common case where we need to rebuild the
study queue, but is also set when changing the card flags. We want to
avoid a queue rebuild in that case, as it causes UI flicker, and may
result in a different card being shown. Note marking doesn't trigger
a queue build, but still causes flicker, and may return the user back
to the front side when they were looking at the answer.

I still think entity-based change tracking is the simplest in the
common case, but to solve the above, I've introduced an enum describing
the last operation that was taken. This currently is not trying to list
out all possible operations, and just describes the ones we want to
special-case.

Other changes:

- Fire the old 'state_did_reset' hook after an operation is performed,
so legacy code can refresh itself after an operation is performed.
- Fire the new `operation_did_execute` hook when mw.reset() is called,
so that as the UI is updated to the use the new hook, it will still
be able to refresh after legacy code calls mw.reset()
- Update the deck browser, overview and review screens to listen to
the new hook, instead of relying on the main window to call moveToState()
- Add a 'set flag' backend action, so we can distinguish it from a
normal card update.
- Drop the separate added/modified entries in the change list in
favour of a single entry per entity.
- Add typing to mw.state
- Tweak perform_op()
- Convert a few more actions to use perform_op()
2021-03-19 19:45:21 +10:00
..
backend more reset refactoring 2021-03-19 19:45:21 +10:00
card more reset refactoring 2021-03-19 19:45:21 +10:00
config move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
deckconf handle duplicate keys in schema 11 deckconf 2021-03-04 11:52:15 +10:00
decks move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
media fix some comments in wrong position after format 2021-01-09 14:26:51 +10:00
notes move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
notetype If a template name contains only quote, show relevant error message 2021-03-14 02:10:48 +01:00
revlog dispatch undo operations via enum instead of trait 2021-03-10 11:53:27 +10:00
scheduler move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
search use native boolkey instead of separate getters/setters 2021-03-10 11:53:27 +10:00
stats undo support for config entries 2021-03-10 11:53:27 +10:00
storage move collection mtime bump into backend 2021-03-19 19:45:21 +10:00
sync Borrow dids in remove_decks_and_child_decks 2021-03-10 15:56:54 +01:00
tags move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
undo more reset refactoring 2021-03-19 19:45:21 +10:00
adding.rs Simplify note adding and the deck/notetype choosers 2021-03-10 11:53:27 +10:00
backend_proto.rs NF: add AGPL licence missing in some file 2021-01-31 21:50:21 +01:00
cloze.rs handle multiple clozes in cloze-only filter 2020-07-29 12:54:29 +10:00
collection.rs move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
dbcheck.rs undo support for config entries 2021-03-10 11:53:27 +10:00
err.rs Fix markdown escaping in search errors 2021-03-12 20:32:38 +01:00
filtered.rs consume original card when updating 2021-03-12 16:20:58 +10:00
findreplace.rs use native boolkey instead of separate getters/setters 2021-03-10 11:53:27 +10:00
fluent_proto.rs NF: add AGPL licence missing in some file 2021-01-31 21:50:21 +01:00
i18n.rs plural rules and decimal separator should use bundle's language 2020-12-14 14:23:49 +10:00
latex.rs Add Alt text to latex image 2020-12-30 18:00:06 +01:00
lib.rs move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
log.rs skip terminal logging unless LOGTERM defined 2020-04-07 10:25:47 +10:00
markdown.rs render deck description with markdown; strip images 2021-02-06 15:02:40 +10:00
ops.rs more reset refactoring 2021-03-19 19:45:21 +10:00
preferences.rs move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
prelude.rs move ops.rs out of undo/ 2021-03-19 19:45:21 +10:00
serde.rs handle missing deck ID in templates 2021-01-25 16:47:23 +10:00
template.rs show the empty card message on the back of the card as well 2021-03-01 15:32:31 +10:00
template_filters.rs add cloze-only filter 2020-07-21 12:59:28 +10:00
text.rs initial work on moving v2 card answering into backend 2021-02-20 14:48:07 +10:00
timestamp.rs fix inconsistent test handling on Windows 2021-03-01 13:36:36 +10:00
types.rs add note/card removal to backend 2020-06-04 18:21:04 +10:00
version.rs don't pass BUILDINFO into build script 2020-12-21 16:04:29 +10:00