Optimized again dictionary page and working import
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user