mirror of
https://github.com/ankitects/anki.git
synced 2025-12-13 23:00:58 -05:00
embed enum to avoid conflicts
This commit is contained in:
parent
f75fd5335d
commit
527c8bf867
2 changed files with 10 additions and 10 deletions
|
|
@ -520,13 +520,12 @@ message CardTemplate {
|
|||
CardTemplateConfig config = 5;
|
||||
}
|
||||
|
||||
enum NoteTypeKind {
|
||||
NORMAL = 0;
|
||||
CLOZE = 1;
|
||||
}
|
||||
|
||||
message NoteTypeConfig {
|
||||
NoteTypeKind kind = 1;
|
||||
enum Kind {
|
||||
NORMAL = 0;
|
||||
CLOZE = 1;
|
||||
}
|
||||
Kind kind = 1;
|
||||
uint32 sort_field_idx = 2;
|
||||
string css = 3;
|
||||
// fixme: anki currently sets this without flushing
|
||||
|
|
@ -539,13 +538,13 @@ message NoteTypeConfig {
|
|||
}
|
||||
|
||||
message CardRequirement {
|
||||
enum CardRequirementKind {
|
||||
enum Kind {
|
||||
None = 0;
|
||||
Any = 1;
|
||||
All = 2;
|
||||
}
|
||||
uint32 card_ord = 1;
|
||||
CardRequirementKind kind = 2;
|
||||
Kind kind = 2;
|
||||
repeated uint32 field_ords = 3;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@ mod stock;
|
|||
mod templates;
|
||||
|
||||
pub use crate::backend_proto::{
|
||||
card_requirement::CardRequirementKind, CardRequirement, CardTemplateConfig, NoteFieldConfig,
|
||||
NoteType as NoteTypeProto, NoteTypeConfig, NoteTypeKind,
|
||||
card_requirement::Kind as CardRequirementKind, note_type_config::Kind as NoteTypeKind,
|
||||
CardRequirement, CardTemplateConfig, NoteFieldConfig, NoteType as NoteTypeProto,
|
||||
NoteTypeConfig,
|
||||
};
|
||||
pub(crate) use cardgeninfo::CardGenContext;
|
||||
pub use fields::NoteField;
|
||||
|
|
|
|||
Loading…
Reference in a new issue