Optimized again dictionary page and working import

This commit is contained in:
2026-08-14 23:03:15 +03:00
parent 17e06256c1
commit eb6c9c5084
9 changed files with 605 additions and 95 deletions
+7
View File
@@ -199,6 +199,7 @@ impl RepetitionState {
"speech" => self.draw_voice(),
"reading" => self.draw_reading(word),
"context" => self.draw_context(word),
"description" => self.draw_description(word),
_ => space().into(),
})
}
@@ -274,6 +275,12 @@ impl RepetitionState {
Some(context) => text!("{}", context).size(24).into(),
}
}
fn draw_description(&self, word: &WordData) -> Element<'_, RepetitionMessage> {
match word.additional.get("context") {
None => space().into(),
Some(context) => text!("{}", context).size(24).into(),
}
}
}
impl KeyPressedPage for RepetitionState {