Damien Elmes
4438be2c8d
protobuf tidyups
2020-05-18 09:26:14 +10:00
Damien Elmes
e894125620
use empty buffer if the other map is empty in dconf
2020-05-18 08:12:27 +10:00
Damien Elmes
ef88cb59e6
fix syncing
2020-05-17 20:52:02 +10:00
Damien Elmes
94722c4fbb
minor tidyups in decks.py
2020-05-17 20:13:29 +10:00
Damien Elmes
e6379bc4d0
update current note type in backend
2020-05-17 20:01:16 +10:00
Damien Elmes
e230f360e9
ensure notetype name unique on add as well
2020-05-17 19:41:47 +10:00
Damien Elmes
b676522e5c
fix renaming corner cases and decks.update()
...
- .update() should update a single deck and preserve usn by default,
as that's what existing code expects
- decks are automatically renamed when they conflict with an existing
name
2020-05-17 19:07:15 +10:00
Damien Elmes
2c19e171ed
handle deletion of default deck in backend; use + instead of _
2020-05-17 15:22:19 +10:00
Damien Elmes
6728da62c5
fix shared deck conf warning
2020-05-17 14:37:59 +10:00
Damien Elmes
336349d8d1
update before_upload()
2020-05-17 14:13:21 +10:00
Damien Elmes
a682865169
move deck config to protobuf
2020-05-17 13:28:41 +10:00
Damien Elmes
e85911c4e4
add option to limit deck tree counts to a particular node
2020-05-17 08:38:49 +10:00
Damien Elmes
ab97eaaf15
use deck tree for new/review count calculation
...
- wins back the performance lost by the decks and dconf not being
in memory, and the overhead of serializing data for DB calls
- card counts are no longer capped to 1000
- learn counts are currently still calculated separately - can't merge
v1 counts without changing the existing behaviour
- partially rendering the tree may yield more savings
2020-05-16 20:28:03 +10:00
Damien Elmes
17efa85d75
update rusqlite
2020-05-16 19:49:08 +10:00
Damien Elmes
e36e23b563
when merging day# in deck, make sure to reset older values
2020-05-16 15:58:25 +10:00
Damien Elmes
8a42896fb8
speed up children() and add deck_and_child_ids()
2020-05-16 15:40:07 +10:00
Damien Elmes
07ee7d6f74
rework and merge updateCutoff
...
- the old "mutate but don't save" approach to resetting the "done today"
counts no longer works, and was inefficient anyway - now we just check
the day when returning the count
- remove separate implementation for v1 scheduler
This is a stop-gap solution - a bigger refactor will need to wait
until the deck/note type changes have stabilized.
2020-05-16 15:14:16 +10:00
Damien Elmes
c138917773
formatting
2020-05-16 14:59:47 +10:00
Damien Elmes
2e5f745b85
use the latest day when converting from legacy deck
2020-05-16 14:58:14 +10:00
Damien Elmes
b3205e5d5d
only update active when selecting deck/resetting
...
We were previously doing this every time a card was answered.
2020-05-16 14:57:46 +10:00
Damien Elmes
70afc782ca
add a unit test for deck counts
2020-05-16 14:07:48 +10:00
Damien Elmes
f76b82d8ae
add find_deck_in_tree()
2020-05-16 13:05:20 +10:00
Damien Elmes
afdab1beef
save profile stats to file instead of generating report
...
Can use an external tool like snakeviz to query them after a run.
2020-05-16 12:53:01 +10:00
Damien Elmes
2183e16152
fix lint issues
2020-05-16 12:20:20 +10:00
Damien Elmes
a249d61bf8
update unit tests to use deck_due_tree()
2020-05-16 12:10:40 +10:00
Damien Elmes
875d638c29
fix+speed up deck list from Filters button
...
I don't think it makes much sense to keep these lists that largely
duplicate the sidebar functionality, but they remain for now.
2020-05-16 11:54:08 +10:00
Damien Elmes
c60229779c
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
6c3157a028
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
6d4e98c13b
avoid duplicate reset in overview
2020-05-15 21:54:56 +10:00
Damien Elmes
7de2fa5b58
remove unused default(Dynamic)Deck
2020-05-15 21:47:33 +10:00
Damien Elmes
cbfc9d5a87
handle default deck and filtered deck suppression in the backend
2020-05-15 21:21:10 +10:00
Damien Elmes
8a063a8a8c
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
a5dc561933
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
dc6471ad40
fetch stock notetypes from backend
2020-05-15 17:08:24 +10:00
Damien Elmes
fd9fc8701c
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
91e71ae044
show (Deck) when card hasn't been added
2020-05-15 15:01:28 +10:00
Damien Elmes
1769cef549
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
548f266618
update replay suppression in clayout
2020-05-15 14:26:00 +10:00
Damien Elmes
4c0ebb9a03
<= in modified_after_begin for unit tests
2020-05-15 14:24:59 +10:00
Damien Elmes
6c4d6ad933
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
120dd7fc03
fetch/set remaining collection properties as required
2020-05-15 13:33:37 +10:00
Damien Elmes
8012d4ec69
fix exporting bug
...
can't/shouldn't pop up confirmation message on export
2020-05-15 11:03:34 +10:00
Damien Elmes
8b7ba99f6e
no longer need to check addNote's return value
2020-05-14 21:59:42 +10:00
Damien Elmes
8dcb7fd2ba
check for empty cloze cards when rendering as well
2020-05-14 21:56:45 +10:00
Damien Elmes
6dd31341f8
add "fill empty" checkbox
2020-05-14 20:58:45 +10:00
Damien Elmes
aed2eb2cc2
update Add Field button
2020-05-14 18:01:15 +10:00
Damien Elmes
4c52d41632
use group box instead of tabs in card layout screen
2020-05-14 17:26:40 +10:00
Damien Elmes
b2b33d9ad8
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
4a00ad075c
drop availOrds(), and use backend for getting cloze numbers
2020-05-14 12:14:00 +10:00
Damien Elmes
b59ea2d36f
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