anki/ftl/core
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
..
actions.ftl Remove edit mode 2021-03-08 11:55:15 +01:00
adding.ftl move ftl into top level ftl/ folder; make it source of truth for aqt 2020-11-18 16:20:58 +10:00
browsing.ftl experiment with preserving search when resetting 2021-03-19 19:45:21 +10:00
card-stats.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
card-template-rendering.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
card-templates.ftl update remaining python format strings to Fluent 2020-11-22 14:57:53 +10:00
custom-study.ftl move ftl into top level ftl/ folder; make it source of truth for aqt 2020-11-18 16:20:58 +10:00
database-check.ftl move ftl into top level ftl/ folder; make it source of truth for aqt 2020-11-18 16:20:58 +10:00
deck-config.ftl add markdown flag for deck description 2021-02-09 18:47:19 +10:00
decks.ftl Remove prompt when deleting from deckbrowser 2021-03-11 10:28:23 +01:00
editing.ftl move ftl into top level ftl/ folder; make it source of truth for aqt 2020-11-18 16:20:58 +10:00
empty-cards.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
errors.ftl catch attempts to nest under a filtered deck; don't show traceback 2021-03-01 09:58:12 +10:00
exporting.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
fields.ftl fix ftl formatting 2021-01-04 13:27:35 +10:00
findreplace.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
importing.ftl update remaining python format strings to Fluent 2020-11-22 14:57:53 +10:00
media-check.ftl avoid using literal 1 in English translations 2020-12-18 10:14:19 +10:00
media.ftl remove format separator from recording string 2020-12-16 19:44:47 +10:00
network.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
notetypes.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
preferences.ftl rework v2 scheduler upgrade; drop downgrade 2021-02-21 15:50:41 +10:00
profiles.ftl Set up default language before loading profile 2020-11-21 05:29:23 +03:00
scheduling.ftl fix 'forgot card' translation string 2021-03-10 12:03:37 +10:00
search.ftl Add button in dynDeckConf to search in browser 2021-02-01 13:55:03 +01:00
statistics.ftl show actual error when graphData fails 2021-01-29 14:39:05 +10:00
studying.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
sync.ftl automatically format/check ftl files 2020-11-22 15:30:59 +10:00
undo.ftl more reset refactoring 2021-03-19 19:45:21 +10:00