RumovZ
632ad14801
Remove protobuf filters whole_col and current_deck
2021-01-31 11:12:49 +01:00
Damien Elmes
e5f9e4c5e4
embed BuiltinSortKind
2021-01-31 18:56:16 +10:00
Damien Elmes
1b4106dbf0
embed kind enum in StockNoteType and remove prefix
2021-01-31 18:56:16 +10:00
Damien Elmes
9a697fd843
Merge branch 'more-backend-search' into main
2021-01-31 14:21:51 +10:00
Damien Elmes
5710e4bbd0
move drag/drop deck logic to backend
2021-01-31 13:46:31 +10:00
RumovZ
25393466dd
Rename EaseKind to RatingKind
2021-01-30 19:03:50 +01:00
RumovZ
2539747115
Manually namespace enum variants in SearchTerm
...
In protobuf "...enum values use C++ scoping rules, meaning that
enum values are siblings of their type, not children of it.
Therefore, [an enum variant] must be unique within [a message],
not just within [the enum.]"
So we must prefix enum variants with their enum's name, but can
also call them directly from the message namespace.
The protobuf crate is smart, though, and strips the prefixes.
(Simultaneously change some SearchTerm variant names.)
2021-01-30 17:56:29 +01:00
Damien Elmes
190922666b
move Rating up a level
...
More ergonomic, and will allow reuse if we expose prop:rated in
the future.
2021-01-30 11:54:39 +10:00
Damien Elmes
2f1bbd44d2
simplify nid/nids searches, and ditch helper function
...
- IdList could be re-used for a cids: search in the future if required.
- Embedding the message means it's easy to access from Python as
an attribute of SearchTerm.
2021-01-30 11:37:00 +10:00
Damien Elmes
f6f537e89f
simplify Dupe message and ditch helper function
...
Calling code doesn't need to know about the existence of such helpers;
it can just rely on code completion to discover the required arguments.
2021-01-30 11:10:26 +10:00
Damien Elmes
b34d128560
rename FilterToSearchIn in backend to match frontend
2021-01-30 10:54:21 +10:00
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
Damien Elmes
34c53aafb4
add getter/setter for boolean config values
2021-01-29 21:03:19 +10:00
RumovZ
12c97442c9
Rename filters added_in etc. to added_in_days
2021-01-29 09:38:13 +01:00
Damien Elmes
137679a1a1
remove unused set_all_config; expose .all_config().
2021-01-29 16:30:42 +10: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
387be76c00
minor wording tweak: GraphsPreferences -> GraphPreferences
2021-01-23 20:47:45 +10:00
Henrik Giesel
a5f59515e2
Rename GraphsPreferencesOut to simply GraphsPreferences
2021-01-22 19:39:03 +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
12a36a7dc7
handle non-chunked graves from AnkiDroid
2021-01-22 10:00:25 +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
112aa44c90
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-15 01:12:01 +03:00
abdo
4911945b9b
Refactor code for clearing unused tags and saving collapse state
2021-01-14 07:04:14 +03:00
RumovZ
cbb9bb96a7
Add pb message for dupe filter
2021-01-14 10:42:37 +10:00
Damien Elmes
9f3959ccad
Merge pull request #918 from hgiesel/ratedflags
...
Introduce `resched:n` instead of `rated:n:0`
2021-01-14 10:19:10 +10:00
Henrik Giesel
28c53a410a
Rename EaseKind values
2021-01-13 11:41:48 +01:00
Damien Elmes
6cc58451b1
add local sync server frontend
2021-01-13 11:42:00 +10:00
abdo
c423e8d7bb
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-12 23:31:58 +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
Damien Elmes
48892e588b
tidy up UTC offset handling/timing calculations
...
- use the TimestampSecs newtype instead of raw i64s
- use FixedOffset instead of a minutes_west offset
- check localOffset each time the timing is calculated, and set it
if it's stale - even for v1.
- check for and fix missing rollover when calculating timing
- stop explicitly passing localOffset in the sync/start call
2021-01-12 21:32:56 +10:00
Damien Elmes
e89d02433d
allow normal sync tests to run offline
2021-01-12 18:47:08 +10:00
Henrik Giesel
fc52046808
Remove EaseKind impl in favor of transforming to sql in function
2021-01-11 17:10:17 +01:00
Damien Elmes
eda1fb49fd
favour readability over brevity in filter conversion
2021-01-10 09:19:33 +10:00
abdo
12c09d7f80
Remove unused backend methods & formatting
2021-01-09 17:48:34 +03:00
abdo
26d595b428
Fix tag collapse state not getting updated
2021-01-09 17:46:52 +03:00
abdo
a17d309ed3
Move tag collapse method to the backend
2021-01-09 17:10:16 +03:00
abdo
a18227acc4
Do not check for missing tag parents at registration time
2021-01-09 17:10:16 +03:00
abdo
a30a2638ce
Hierarchical tags
2021-01-09 17:10:13 +03:00
RumovZ
455b693623
Provide filter searches through backend
2021-01-09 10:50:08 +01:00
Damien Elmes
61583aae03
fix reposition not honoring provided order, and add unit test
2021-01-08 20:38:49 +10:00
Damien Elmes
ba665b0e02
handle SortOrderProto conversion separately, and use enum getter
...
In most cases we can just fall back on the default enum value instead
of caring if it's missing/invalid.
2021-01-08 15:56:20 +10:00
Damien Elmes
f20a8f71b7
convert sort_kind_from_pb into from impl
2021-01-08 09:42:54 +10:00
Damien Elmes
336cb3595b
convert from protobuf enum, rather than the underlying i32
2021-01-08 09:24:03 +10:00
RumovZ
991a3c1596
Add native enum for concatenate_search's separator
2021-01-07 12:50:57 +01:00