AnkiDroid expects timer to be an integer
https://github.com/ankidroid/Anki-Android/issues/6089#issuecomment-621110598
This commit is contained in:
parent
913c268705
commit
d36bd33972
@ -9,7 +9,7 @@ use crate::{
|
|||||||
timestamp::{TimestampMillis, TimestampSecs},
|
timestamp::{TimestampMillis, TimestampSecs},
|
||||||
types::Usn,
|
types::Usn,
|
||||||
};
|
};
|
||||||
use serde_aux::field_attributes::{deserialize_bool_from_anything, deserialize_number_from_string};
|
use serde_aux::field_attributes::deserialize_number_from_string;
|
||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use serde_repr::{Deserialize_repr, Serialize_repr};
|
use serde_repr::{Deserialize_repr, Serialize_repr};
|
||||||
@ -29,8 +29,8 @@ pub struct DeckConf {
|
|||||||
pub(crate) usn: Usn,
|
pub(crate) usn: Usn,
|
||||||
max_taken: i32,
|
max_taken: i32,
|
||||||
autoplay: bool,
|
autoplay: bool,
|
||||||
#[serde(deserialize_with = "deserialize_bool_from_anything")]
|
#[serde(deserialize_with = "default_on_invalid")]
|
||||||
timer: bool,
|
timer: u8,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
replayq: bool,
|
replayq: bool,
|
||||||
pub(crate) new: NewConf,
|
pub(crate) new: NewConf,
|
||||||
@ -188,7 +188,7 @@ impl Default for DeckConf {
|
|||||||
usn: Usn(0),
|
usn: Usn(0),
|
||||||
max_taken: 60,
|
max_taken: 60,
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
timer: false,
|
timer: 0,
|
||||||
replayq: true,
|
replayq: true,
|
||||||
new: Default::default(),
|
new: Default::default(),
|
||||||
rev: Default::default(),
|
rev: Default::default(),
|
||||||
|
Loading…
Reference in New Issue
Block a user