aboutsummaryrefslogtreecommitdiff
path: root/src/gui/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/mod.rs')
-rw-r--r--src/gui/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/mod.rs b/src/gui/mod.rs
index 3abe238..d721b90 100644
--- a/src/gui/mod.rs
+++ b/src/gui/mod.rs
@@ -47,15 +47,15 @@ pub fn start(
let title = title(
deck_name,
- db::count_available(conn).unwrap_or(0),
+ db::cards::count_available(conn).unwrap_or(0),
hide_remaining,
);
- match db::pick_random_ready(conn) {
+ match db::cards::pick_random_ready(conn) {
Some(card) => match question::ask(term, &title, &card)? {
question::Response::Aborted => break,
question::Response::Answered { difficulty } => {
- db::update(
+ db::cards::update(
conn,
&card.question,
&space_repetition::update(card.state, difficulty),
@@ -63,7 +63,7 @@ pub fn start(
}
},
None => {
- let message = match db::next_ready(conn) {
+ let message = match db::cards::next_ready(conn) {
Some(ready) => {
let now = time::seconds_since_unix_epoch()?;
let duration = time::pp_duration(ready - now);