Commit graph

916 commits

Author SHA1 Message Date
Damien Elmes
dbe852431f use a separate enum for the is:* searches 2021-01-30 10:49:00 +10:00
Damien Elmes
e3f2b77c5b combine forgot_in_days and studied_today into a more general 'rated' 2021-01-30 10:26:23 +10:00
RumovZ
c7365abc9e Refactor search_string() and FilterToSearchIn
See #955.
2021-01-29 18:27:33 +01:00
RumovZ
12c97442c9 Rename filters added_in etc. to added_in_days 2021-01-29 09:38:13 +01:00
RumovZ
d3d34bd9b3 Add backend filter for field name 2021-01-28 19:48:01 +01:00
RumovZ
d403430846 Fix nid search test 2021-01-28 16:29:34 +01:00
RumovZ
82cfee17d0 Add nid filter on backend 2021-01-28 16:19:55 +01:00
RumovZ
e80217af6a Add forgot, due and added filters on backend 2021-01-28 11:11:32 +01:00
Damien Elmes
60bdb173ac Merge pull request #953 from hgiesel/backlogcb
Add FutureDueShowBacklog as preferences
2021-01-27 19:44:01 +10:00
Damien Elmes
630360641f suggest DB check if HTTP status 400 is returned 2021-01-27 14:23:28 +10:00
Henrik Giesel
e30f62c2a5 Add FutureDueShowBacklog as preferences 2021-01-27 01:15:19 +01:00
Damien Elmes
6285729c49 Merge pull request #897 from hgiesel/statssearch
Triggering searches from the stats screen.
2021-01-26 11:31:36 +10:00
Henrik Giesel
6b0a26e46b Move dispatch logic from Histogram to individual graphs 2021-01-25 16:34:44 +01:00
Henrik Giesel
8ecd1cad03 Add back bridge_commands_support via backend.proto 2021-01-25 13:47:20 +01:00
Kerrick Staley
e157eb443f Add comment explaining why sfld column has type integer
The `notes.sfld` column in the `collection.anki2` database has type `integer`, even though it contains text. This is [something SQLite allows](https://dba.stackexchange.com/questions/106364/text-string-stored-in-sqlite-integer-column) and was done to allow integer values to sort numerically. Add a comment explaining this.
2021-01-25 18:39:59 +08:00
Damien Elmes
b00c62455a handle missing deck ID in templates
https://github.com/ankidroid/Anki-Android/issues/7512
2021-01-25 16:47:23 +10:00
Damien Elmes
028fdb2562 coerce some more invalid decimal values to ints during sync 2021-01-25 09:43:50 +10:00
Damien Elmes
75f06e21bc handle older clients not setting 'done' key when false 2021-01-24 09:05:17 +10:00
Damien Elmes
a6a4c0032d Merge pull request #934 from hgiesel/graphprefs
Add GraphsPreferences API to graphs for setting persistent preferences
2021-01-23 21:24:41 +10:00
Damien Elmes
387be76c00 minor wording tweak: GraphsPreferences -> GraphPreferences 2021-01-23 20:47:45 +10:00
Damien Elmes
81b312ddd1 handle decks/notetypes with a duplicate name being sent in a sync
Typically caused by older clients, but could happen if the user added
the same name on different devices without syncing.

Also add an inactive test that was used to try track down this issue
and might be useful in the future.
2021-01-23 12:59:24 +10:00
Henrik Giesel
a5f59515e2 Rename GraphsPreferencesOut to simply GraphsPreferences 2021-01-22 19:39:03 +01:00
Henrik Giesel
7149c468e5 Set calendar labels to emptyColour 2021-01-22 18:15:16 +01:00
Henrik Giesel
24dd14896a Make cardCountsSeparateInactive settable 2021-01-22 18:03:58 +01:00
Henrik Giesel
d6ba9eb61a Uniformly rename firstWeekday to firstDayOfWeek 2021-01-22 16:53:33 +01:00
Henrik Giesel
846dd396a6 Add non-functioning logic for settings graphs preferences 2021-01-22 13:14:35 +01:00
Henrik Giesel
1516f5c37e Add GraphsPreferences endpoint to backend 2021-01-22 13:13:48 +01:00
Damien Elmes
744c096e6e (de)serialize Weekday directly
Re: discussion in https://github.com/ankitects/anki/pull/934
2021-01-22 12:12:57 +10:00
Damien Elmes
12a36a7dc7 handle non-chunked graves from AnkiDroid 2021-01-22 10:00:25 +10:00
Damien Elmes
5cd125e2c8 add missing file header 2021-01-21 10:31:34 +10:00
Damien Elmes
4890872c3a fix context in rated: search error message 2021-01-19 18:33:10 +10:00
Damien Elmes
2685e641ee more parsing error tweaks
The majority of the error checking can now be delegated to routines
like parse_f32(), parse_negative_i32() and so on, instead of creating
specific error messages for each type.
2021-01-19 15:50:26 +10:00
Damien Elmes
7eb78ecb16 simplify write_props() and associated translations
This is a work in progress; see associated PR discussion to follow.
2021-01-19 12:40:16 +10:00
Damien Elmes
57d32c6e4a have register_tag mutate the tag if it changes it, instead of copying 2021-01-19 12:37:51 +10:00
Damien Elmes
6b07984265 fix deck and tag normalization
The issue existed in the deck code as well; I've added a test for it.
2021-01-19 12:36:01 +10:00
Damien Elmes
db3f29ac30 Merge pull request #929 from abdnh/tag-case
Make tags match their parents case
2021-01-19 11:56:03 +10:00
Damien Elmes
de16039b48 tweaks to the parent matching behaviour
- move logic out of the storage layer - its job is only to read
and write data from the DB
- avoid the Result within a Result
- return the preferred case as an option, so we can avoid a copy
in the unchanged case
- return a Cow when normalizing, so we can avoid copying in the
unchanged case
- add tags directly in clear_unused_tags(), so we avoid doing
lookups for every tag in the tag list
2021-01-19 11:52:24 +10:00
abdo
ee32ec4d25 Make tags match their parents case
https://github.com/ankitects/anki/pull/900/#issuecomment-762018745
2021-01-19 02:29:09 +03:00
Henrik Giesel
9246698d4e Satisfy formatter 2021-01-19 00:17:30 +01:00
Henrik Giesel
346b7e7f45 Add firstWeekday to GraphsOut 2021-01-18 23:10:53 +01:00
Damien Elmes
d92ba2c246 Merge pull request #900 from abdnh/tagtree
Hierarchical tags
2021-01-18 16:36:22 +10:00
abdo
a6234d1b66 clear_tag() should be case-insensitive 2021-01-18 03:52:28 +03:00
Henrik Giesel
232f5b5e79 Adjust unit tests for new InvalidRatedEase 2021-01-18 00:05:20 +01:00
Henrik Giesel
df3995e688 Generalize InvalidRatedEase error for rated and prop:rated 2021-01-17 23:55:05 +01:00
Henrik Giesel
a15ed65b8e Use explicit unreachable in rust pattern matching 2021-01-17 22:18:12 +01:00
Henrik Giesel
6ace112cad Add resched to tags 2021-01-17 21:44:56 +01:00
Henrik Giesel
fb497ea2e6 Reintroduce false removed limits 2021-01-16 17:38:02 +01:00
Henrik Giesel
cb7df2c71f Change argument order of write_rated to be more in line with the logic 2021-01-16 15:24:22 +01:00
Henrik Giesel
915cde892b Lift the 365 limit from rated/resched searches 2021-01-16 15:08:15 +01:00
Henrik Giesel
682ab23482 Fix issues after rebasing 2021-01-16 13:07:35 +01:00