Commit graph

24 commits

Author SHA1 Message Date
Damien Elmes
d793c30526 switch NoteType to Notetype
When used as a variable, we were typically calling it a 'notetype', not
a 'note type'.
2021-03-27 22:03:19 +10:00
Damien Elmes
a90d5aa359 use mixed case for abbreviations in Rust code
So, this is fun. Apparently "DeckId" is considered preferable to the
"DeckID" were were using until now, and the latest clippy will start
warning about it. We could of course disable the warning, but probably
better to bite the bullet and switch to the naming that's generally
considered best.
2021-03-27 19:53:33 +10:00
RumovZ
44f86f6402 Add get_note_without_fields() from storage 2021-03-20 11:59:45 +01:00
Damien Elmes
0e925b407d speed up tag drag&drop and finish tag tidyup
approx 4x speedup when reparenting 10-15 tags and their children at once
2021-03-19 19:45:21 +10:00
Damien Elmes
6ce9297e37 introduce separate routine to remove tags from specific notes
We were (ab)using the bulk update routine to do deletions, but that
code was really intended to be used for finding&replacing, where an
exact match is not a requirement.
2021-03-19 19:45:21 +10:00
Damien Elmes
c98c553a96 make tag renaming undoable, and speed it up
~3x speedup when renaming a tag that's on 25k notes
2021-03-19 19:45:21 +10:00
Damien Elmes
e5aeb69728 initial work on undoing reviews+burying siblings
- fetch sfld and csum when fetching notes, to make it cheaper
to write them back out unmodified
- make `fields` private, and access it via accessors, so we can
still catch when fields have been mutated without calling
prepare_for_update()
- fix python importing code passing a string in as the checksum
2021-03-10 11:47:53 +10:00
Damien Elmes
957e781484 add tag drag & drop support 2021-02-02 20:14:04 +10:00
Damien Elmes
ff8c8a3bca simplify unused tags and DB check
- backend routines should contain minimal logic, and should call
into a routine on the collection
- instead of copying the giant-string approach the Python code was taking,
we use a HashSet to keep track of seen tags as we loop through the
notes, which should be more efficient
2021-01-16 20:38:16 +10:00
abdo
4911945b9b Refactor code for clearing unused tags and saving collapse state 2021-01-14 07:04:14 +03:00
abdo
e3c873fb32 Keep tags in human form and update the tags table structure
See https://github.com/ankitects/anki/pull/900#issuecomment-758284016

- Leave tag names alone and add the collapsed and config columns to the tags table.
- Update The DB check code to preserve the collapse state of used tags.
- Add a simple test for clearing tags and their children
2021-01-12 23:12:35 +03:00
abdo
a30a2638ce Hierarchical tags 2021-01-09 17:10:13 +03:00
Damien Elmes
00f827f976 fix duplicate search not checking first field
Thanks to abdo for the initial solution. Closes #838
2020-11-30 09:27:10 +10:00
Damien Elmes
aaa950f66c handle notes with invalid utf8 2020-11-06 10:21:51 +10:00
Damien Elmes
7f42500e53 rename some card+note fields in backend 2020-09-01 10:24:38 +10:00
Damien Elmes
75471224fa add progress to db check 2020-06-08 21:07:36 +10:00
Damien Elmes
1c52d11133 rework usn handling in sync 2020-06-01 13:57:10 +10:00
Damien Elmes
c4032c0176 another snapshot of sync work
progress handler is going to need to be reworked to function across
threads
2020-06-01 13:57:10 +10:00
Damien Elmes
2114fdf6f5 more syncing work
no checks yet
2020-06-01 13:57:10 +10:00
Damien Elmes
91e3256e6a move dupe check to backend 2020-05-24 19:48:56 +10:00
Damien Elmes
336349d8d1 update before_upload() 2020-05-17 14:13:21 +10:00
Damien Elmes
24ef0cc6f1 add separate decks table, and start on moving deck handling to Rust
The Python tests are passing, but there are still a number of issues
to work through, and the table/protobuf schema is not yet finalized.
2020-05-12 21:13:33 +10:00
Damien Elmes
4a2256aecb the start of note adding, and note type changes 2020-05-12 21:13:33 +10:00
Damien Elmes
638e69af91 move note db code to storage 2020-05-12 21:13:33 +10:00