Damien Elmes
84b84ae31c
use add_card()
2020-03-27 15:11:07 +10:00
Damien Elmes
6b9378fb41
add (unused) add_card, and move sql to separate files
2020-03-27 14:48:25 +10:00
Damien Elmes
82ed288dc5
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
2f4e35d566
store cached statements in a vec instead of separate optionals
2020-03-27 09:51:19 +10:00
Damien Elmes
369d2d89d9
update card in transaction
2020-03-27 07:58:25 +10:00
Damien Elmes
fe327e32ca
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
7f16f436c3
handle mtime/usn bump in backend, and tweak integer sizes
2020-03-26 20:55:04 +10:00
Damien Elmes
7a56d18539
report invalid type/queue
2020-03-26 19:32:35 +10:00
Damien Elmes
13c7c82ae3
fix two cases where a float was being written into due
2020-03-26 19:05:18 +10:00
Damien Elmes
47504245dc
update_card()
2020-03-26 18:54:20 +10:00
Damien Elmes
1acfe7d3cc
tweak code for mypy
2020-03-26 17:47:53 +10:00
Damien Elmes
7ddaf93f7a
use backend to get card
2020-03-26 17:47:43 +10:00
Damien Elmes
8abba00496
DeckID, CardID
2020-03-26 15:10:40 +10:00
Damien Elmes
f52e775354
NoteTypeID
2020-03-26 15:00:24 +10:00
Damien Elmes
4ec30e412a
newtype NoteID
2020-03-26 14:42:43 +10:00
Damien Elmes
5eed3d7f71
use a macro for newtype defs
2020-03-26 13:50:20 +10:00
Damien Elmes
39f916a23e
usn newtype
2020-03-26 13:06:02 +10:00
Damien Elmes
eb89a2db3f
use newtypes for distinguishing between second and millisecond stamps
2020-03-26 12:59:51 +10:00
Damien Elmes
65b8988817
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
8c80f96314
high due numbers shouldn't force a full sync
2020-03-26 09:09:11 +10:00
Damien Elmes
beee1f10e0
possible CI fix
2020-03-25 09:45:50 +10:00
Damien Elmes
818b9193a8
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
1ef984cc2a
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
01e9f889b7
add newline to mear clearly separate different ftl files
2020-03-25 08:53:42 +10:00
Damien Elmes
ea3c6cad42
don't error when -l passes in language without _
2020-03-25 08:53:31 +10:00
Arthur Milchior
c1a8c413b0
remove space in fields
2020-03-24 12:26:48 +01:00
Arthur Milchior
3799b8504f
strip to test whether field is empty
2020-03-24 11:55:55 +01:00
Damien Elmes
e29d380d4c
fix sync getting stuck in a loop when changes is a multiple of 250
2020-03-24 19:30:35 +10:00
Arthur Milchior
31f18e3c94
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
6143a7e218
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
a51dba7255
Merge pull request #524 from Arthur-Milchior/indet_html
...
Ident html in editor
2020-03-24 16:00:57 +10:00
Damien Elmes
483d50cba8
Merge pull request #522 from Arthur-Milchior/editor_did_init
...
editor_did_init
2020-03-24 15:52:50 +10:00
Damien Elmes
d5cbd78798
use forked proto action
2020-03-24 15:50:40 +10:00
Damien Elmes
cc34157e4b
Merge pull request #510 from evandroforks/fix_tests_on_windows
...
Fix tests on windows
2020-03-24 15:33:02 +10:00
Damien Elmes
289bdde20c
handle fields with embedded nuls
2020-03-24 14:53:33 +10:00
Damien Elmes
5c5d1c2af5
remove : check from dbproxy
2020-03-24 10:37:12 +10:00
evandrocoan
6c8b005cab
Deprecated eval usage on qt/tools/typecheck-setup.sh
2020-03-23 18:54:24 -03:00
evandrocoan
b1b3e5b87c
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
f4874941c8
Added name to contributors
2020-03-23 13:08:50 -06:00
Hk-tang
521b0e9e14
Change not not to bool
2020-03-23 11:16:39 -06:00
Arthur Milchior
0c39c4f106
add an id to name tab
2020-03-23 16:52:24 +01:00
Damien Elmes
b1a8107aa1
formatting
2020-03-23 19:54:01 +10:00
Damien Elmes
11a4d582b4
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
84eaf43525
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
f889616ef1
don't pop up network errors for media sync
...
log them instead
2020-03-23 19:06:13 +10:00
Damien Elmes
f429986246
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
7d94465256
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
7a4f3d0318
dump more info in card()/bcard()
2020-03-23 18:39:00 +10:00
Damien Elmes
14a970e923
rename long filenames in fields if files renamed in a previous sync
2020-03-23 18:38:45 +10:00
Arthur Milchior
349d145014
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