Damien Elmes
f2086fc2e3
switch to new deck tree in deck browser
...
Saves us having to look up collapsed/filtered as we render, and gives
us type completion.
2020-05-16 10:52:14 +10:00
Damien Elmes
75d3eebafe
drop usage of nameMap in deckbrowser
...
It was unnecessary, and being called multiple times as we recursed
downwards, slowing things down.
2020-05-16 10:02:08 +10:00
Damien Elmes
83adfb60cf
avoid duplicate reset in overview
2020-05-15 21:54:56 +10:00
Damien Elmes
4d5908dc20
remove unused default(Dynamic)Deck
2020-05-15 21:47:33 +10:00
Damien Elmes
964a69e54e
handle default deck and filtered deck suppression in the backend
2020-05-15 21:21:10 +10:00
Damien Elmes
769bf04f75
remove unused deckDueList() and associated tree code
...
The progress bar add-ons appear to be the only active users of it;
they can switch their old code from iterating over the list to
simply locating the selected deck in deckDueTree(), as its counts should
summarize all the child decks.
2020-05-15 18:37:12 +10:00
Damien Elmes
e44b3bf93c
reuse stock basic type for default field/notetype/etc
...
Could add extra methods in the backend to allocate these in the
future, but as this is not a hot path, this should do for now.
2020-05-15 17:35:00 +10:00
Damien Elmes
2ac33500eb
fetch stock notetypes from backend
2020-05-15 17:08:24 +10:00
Damien Elmes
f650e5557f
add back card deletion count
...
cheaper to look up now that there's an index on notes.mid
2020-05-15 15:28:07 +10:00
Damien Elmes
00db72e365
show (Deck) when card hasn't been added
2020-05-15 15:01:28 +10:00
Damien Elmes
ed52a4dc3f
when previewing cards, use the default deck for now
...
Replay code needs to be able to retrieve deck options. We should
probably use the current deck or pass it in in the future.
2020-05-15 14:50:57 +10:00
Damien Elmes
68e1303880
update replay suppression in clayout
2020-05-15 14:26:00 +10:00
Damien Elmes
7c5980a941
<= in modified_after_begin for unit tests
2020-05-15 14:24:59 +10:00
Damien Elmes
46c363d4aa
track changes in fields dialog as well
...
And avoid bumping schema until user actually saves, but warn at
start.
2020-05-15 13:59:44 +10:00
Damien Elmes
a2b7a30841
fetch/set remaining collection properties as required
2020-05-15 13:33:37 +10:00
Damien Elmes
31480be5e7
fix exporting bug
...
can't/shouldn't pop up confirmation message on export
2020-05-15 11:03:34 +10:00
Damien Elmes
f1c5c88c10
no longer need to check addNote's return value
2020-05-14 21:59:42 +10:00
Damien Elmes
24ffb6ab76
check for empty cloze cards when rendering as well
2020-05-14 21:56:45 +10:00
Damien Elmes
782911471b
add "fill empty" checkbox
2020-05-14 20:58:45 +10:00
Damien Elmes
9a222e620a
update Add Field button
2020-05-14 18:01:15 +10:00
Damien Elmes
c5d574e9f4
use group box instead of tabs in card layout screen
2020-05-14 17:26:40 +10:00
Damien Elmes
5167bb57be
start reworking card layout screen
...
- front/back/css shown in tabs
- front/back preview switchable; only one webview needs to be loaded
- dropdown to select cloze number in preview
- search box to search in front/back/css
2020-05-14 15:24:29 +10:00
Damien Elmes
f23eb350e4
drop availOrds(), and use backend for getting cloze numbers
2020-05-14 12:14:00 +10:00
Damien Elmes
9f676dbe0b
remove availOrds() check in importer
...
Like adding individual cards, we now support importing material even
if it wouldn't generate any cards, and the old availOrds check can't
handle negated conditionals.
2020-05-14 10:27:54 +10:00
Damien Elmes
c601dcef24
remove obsolete preview code
2020-05-14 09:22:53 +10:00
Damien Elmes
6680cdf1d3
update the card layout screen
...
- changes are now committed in bulk when closing the dialog,
and can be canceled
- it's not necessary to save the note to the database to preview it
- duplicate fields are now shown as duplicates in the top list
- redraw preview more quickly
- use + instead of _ when deduplicating names, as the latter is a
glob character
2020-05-13 17:24:49 +10:00
Damien Elmes
12b8fe6147
don't hide static template text when card is empty
2020-05-13 11:17:44 +10:00
Damien Elmes
826cbb0108
fetch template and note fields in backend during normal card render
...
Saves having to serialize the note fields and q/a templates, which
is particularly a win when rendering question/answer in the browse
screen.
Also some work towards being able to preview notes without having to
commit them to the database.
2020-05-13 10:38:49 +10:00
evandrocoan
3f517c71e4
Remove unused t = time.time() variable on qt/aqt/browser.py
2020-05-12 15:09:22 -03:00
evandrocoan
f8c6300e27
Also fix legacy.py::anki.sound._soundReg accepting empty tags
2020-05-12 12:43:35 -03:00
Damien Elmes
9874b19526
handle decks set to random new order
...
It probably makes more sense to randomize on queue build in the future,
but for now this imitates the previous Anki behaviour.
2020-05-12 21:13:34 +10:00
Damien Elmes
7597130145
return resolved deck to facilitate random order mode
2020-05-12 21:13:34 +10:00
Damien Elmes
9317cee9ba
handle scheduling preferences in the backend
2020-05-12 21:13:34 +10:00
Damien Elmes
6ef8d976eb
update readme
2020-05-12 21:13:34 +10:00
Damien Elmes
ea4f150455
fetch timing_today() params in backend
2020-05-12 21:13:34 +10:00
Damien Elmes
eee0d7e92f
switch server back into a bool and rely on config
2020-05-12 21:13:34 +10:00
Damien Elmes
2c7900989c
fix default rollover
2020-05-12 21:13:34 +10:00
Damien Elmes
8af475ac6f
add tests for the other checks, and fix new card due limiting
2020-05-12 21:13:34 +10:00
Damien Elmes
9b1eee85d5
rename SortMode arg to match enum
2020-05-12 21:13:34 +10:00
Damien Elmes
2b47e544a8
add tests for card fixes; implement deck recovery
2020-05-12 21:13:34 +10:00
Damien Elmes
5ec7251f6e
stop using memory for sqlite temp store
...
On large collections this can end up consuming hundreds of megabytes
of RAM on operations like a vacuum.
2020-05-12 21:13:34 +10:00
Damien Elmes
70cc1699a6
rewrite DB check
...
- notes with wrong field count are now recovered instead of
being deleted
- notes with missing note types are now recovered
- notes with missing cards are now recovered
- recover_missing_deck() still needs implementing
- checks required
2020-05-12 21:13:34 +10:00
Damien Elmes
4c9b6be832
fetch notes in nid order
...
May reduce the amount of seeking on conventional disks. Chunking and
fetching batches of notes at once would improve things further, at the
cost of more memory use.
2020-05-12 21:13:34 +10:00
Damien Elmes
2413f286b1
bulk tag add/remove/update; canonify on note save
...
also remove the tag list updated hook - we'll need a better solution in
the future than having the library code call back into the GUI code
2020-05-12 21:13:34 +10:00
Damien Elmes
389b8a0536
add the Extra field back to cloze deletions as "Back Extra"
...
Originally removed because some users were adding cloze deletions to
it, but removing it just replaced that problem with a new problem where
users add the field but don't add it to their card templates.
2020-05-12 21:13:34 +10:00
Damien Elmes
7bab99d873
support disabling unicode normalization in notes
2020-05-12 21:13:34 +10:00
Damien Elmes
a7a485d550
use backend for genCards() and updateFieldCache()
2020-05-12 21:13:34 +10:00
Damien Elmes
05ca797ee6
add pep8 name for findReplace
2020-05-12 21:13:34 +10:00
Damien Elmes
29379a9a50
update extract-po-string to handle plurals again
2020-05-12 21:13:34 +10:00
Damien Elmes
2317574f02
fix tag saving in notes
2020-05-12 21:13:34 +10:00