Commit graph

3756 commits

Author SHA1 Message Date
Damien Elmes
fc846ac4e4 use add_card() 2020-03-27 15:11:07 +10:00
Damien Elmes
1112fc8e8b add (unused) add_card, and move sql to separate files 2020-03-27 14:48:25 +10:00
Damien Elmes
0247d65ccd add benchmark for vec cache
test storage::sqlite::bench::bench_hash_cache ... bench:         399 ns/iter (+/- 27)
test storage::sqlite::bench::bench_no_cache   ... bench:       4,854 ns/iter (+/- 499)
test storage::sqlite::bench::bench_vec_cache  ... bench:           0 ns/iter (+/- 0)
2020-03-27 09:59:48 +10:00
Damien Elmes
d1c44ec06d store cached statements in a vec instead of separate optionals 2020-03-27 09:51:19 +10:00
Damien Elmes
62be1b2688 update card in transaction 2020-03-27 07:58:25 +10:00
Damien Elmes
0f0b90d427 fix progress dialog preventing schema mod
https://anki.tenderapp.com/discussions/beta-testing/1868-anki-2124-beta#comment_48183062

This is an ugly hack - in the future the calling code should be updated
to perform the check prior to starting the operation instead.
2020-03-26 21:07:53 +10:00
Damien Elmes
e28fdde984 handle mtime/usn bump in backend, and tweak integer sizes 2020-03-26 20:55:04 +10:00
Damien Elmes
aa33bf85ef report invalid type/queue 2020-03-26 19:32:35 +10:00
Damien Elmes
369457a1c7 fix two cases where a float was being written into due 2020-03-26 19:05:18 +10:00
Damien Elmes
0510ab7c9c update_card() 2020-03-26 18:54:20 +10:00
Damien Elmes
245a31a432 tweak code for mypy 2020-03-26 17:47:53 +10:00
Damien Elmes
b2fba4e1ff use backend to get card 2020-03-26 17:47:43 +10:00
Damien Elmes
1af3de6f70 DeckID, CardID 2020-03-26 15:10:40 +10:00
Damien Elmes
4150480709 NoteTypeID 2020-03-26 15:00:24 +10:00
Damien Elmes
3395a565a6 newtype NoteID 2020-03-26 14:42:43 +10:00
Damien Elmes
bb0b817d9c use a macro for newtype defs 2020-03-26 13:50:20 +10:00
Damien Elmes
d95cb93d7a usn newtype 2020-03-26 13:06:02 +10:00
Damien Elmes
bfc0287e51 use newtypes for distinguishing between second and millisecond stamps 2020-03-26 12:59:51 +10:00
Damien Elmes
3ca9f61733 reduce the chances of add-ons preventing collections from loading
https://anki.tenderapp.com/discussions/ankidesktop/39953-sync-fail-with-images#comment_48182205
2020-03-26 09:53:15 +10:00
Damien Elmes
4d428f9fa8 high due numbers shouldn't force a full sync 2020-03-26 09:09:11 +10:00
Damien Elmes
711447aa35 possible CI fix 2020-03-25 09:45:50 +10:00
Damien Elmes
350d97b390 Merge pull request #523 from Arthur-Milchior/hook_note_will_load
Hook editor_note_will_load
2020-03-25 09:43:16 +10:00
Damien Elmes
4680c2fe9b Merge pull request #526 from Arthur-Milchior/field_with_space_are_empty
strip to test whether field is empty
2020-03-25 09:36:08 +10:00
Damien Elmes
2bd99127e9 add newline to mear clearly separate different ftl files 2020-03-25 08:53:42 +10:00
Damien Elmes
1d819bd750 don't error when -l passes in language without _ 2020-03-25 08:53:31 +10:00
Arthur Milchior
7dbe8ec21b remove space in fields 2020-03-24 12:26:48 +01:00
Arthur Milchior
e509532ff1 strip to test whether field is empty 2020-03-24 11:55:55 +01:00
Damien Elmes
da07298418 fix sync getting stuck in a loop when changes is a multiple of 250 2020-03-24 19:30:35 +10:00
Arthur Milchior
3ecf8352f5 Hook editor_note_will_load
A current problem I have is that there is nothing similar to hook
inside of javascript. It seems that it would be easier to be able to
add other methods in javascript and call them in loadNote. Currently I
simply redefined loadNote, which is far from perfect
2020-03-24 10:17:01 +01:00
Damien Elmes
83dae0eab4 Merge pull request #525 from Hk-tang/change-to-more-pythonic
Change not not to bool
2020-03-24 16:01:15 +10:00
Damien Elmes
ebb4d5567a Merge pull request #524 from Arthur-Milchior/indet_html
Ident html in editor
2020-03-24 16:00:57 +10:00
Damien Elmes
792dd69b98 Merge pull request #522 from Arthur-Milchior/editor_did_init
editor_did_init
2020-03-24 15:52:50 +10:00
Damien Elmes
a842c3b00a use forked proto action 2020-03-24 15:50:40 +10:00
Damien Elmes
83d1be8743 Merge pull request #510 from evandroforks/fix_tests_on_windows
Fix tests on windows
2020-03-24 15:33:02 +10:00
Damien Elmes
6aced5f125 handle fields with embedded nuls 2020-03-24 14:53:33 +10:00
Damien Elmes
602d6b00c2 remove : check from dbproxy 2020-03-24 10:37:12 +10:00
evandrocoan
b376b78527 Deprecated eval usage on qt/tools/typecheck-setup.sh 2020-03-23 18:54:24 -03:00
evandrocoan
093af85c2e Merge remote-tracking branch 'danielelmes/master' into fix_tests_on_windows
# Conflicts:
#	.github/scripts/trailing-newlines.sh
2020-03-23 18:44:11 -03:00
Hk-tang
7e627d342d Added name to contributors 2020-03-23 13:08:50 -06:00
Hk-tang
f6d2c95888 Change not not to bool 2020-03-23 11:16:39 -06:00
Arthur Milchior
bb25398ed8 add an id to name tab 2020-03-23 16:52:24 +01:00
Damien Elmes
8b3995c1fc formatting 2020-03-23 19:54:01 +10:00
Damien Elmes
7a67f73183 convert asc to desc instead of appending desc to the end of the order
as the latter doesn't work when sorting on more than one column

https://anki.tenderapp.com/discussions/beta-testing/1868-anki-2124-beta#comment_48174812
2020-03-23 19:53:57 +10:00
Damien Elmes
c5fa0b130e reduce the chances of a race condition in mplayer code
Not perfect, it may still happen.

https://anki.tenderapp.com/discussions/ankidesktop/39832-an-error-occurred-audio
2020-03-23 19:15:32 +10:00
Damien Elmes
a34dcb709e don't pop up network errors for media sync
log them instead
2020-03-23 19:06:13 +10:00
Damien Elmes
6a9ed72269 fix collection_did_load() not being called, and remove dead code
https://anki.tenderapp.com/discussions/ankidesktop/39765-_colloadingstate-is-never-run-thus-collection_did_load-hook-is-never-triggered
2020-03-23 18:57:23 +10:00
Damien Elmes
0c4feaa800 cache dark mode value so UI doesn't break when it changes
https://anki.tenderapp.com/discussions/ankidesktop/39550-cant-deactivate-night-mode-on-2121-for-mac
2020-03-23 18:39:37 +10:00
Damien Elmes
1bd4d0db4e dump more info in card()/bcard() 2020-03-23 18:39:00 +10:00
Damien Elmes
4563fe36bc rename long filenames in fields if files renamed in a previous sync 2020-03-23 18:38:45 +10:00
Arthur Milchior
0b0888acd9 Ident html in editor
Sometime I like to print html to understand why it bugs. And I really
prefer to have html indented if it's okay with you. There is no change
appart from the identation and quotes
2020-03-23 08:15:48 +01:00