Remove argument from text_input::State::focused

This commit is contained in:
Héctor Ramón Jiménez 2019-11-13 07:57:22 +01:00
parent cf3c53a063
commit be5466a0a7
2 changed files with 5 additions and 3 deletions

View file

@ -91,10 +91,12 @@ impl State {
Self::default()
}
pub fn focused(value: &str) -> Self {
pub fn focused() -> Self {
use std::usize;
Self {
is_focused: true,
cursor_position: Value::new(value).len(),
cursor_position: usize::MAX,
}
}

View file

@ -153,7 +153,7 @@ impl Task {
}
TaskMessage::Edit => {
self.state = TaskState::Editing {
text_input: text_input::State::focused(&self.description),
text_input: text_input::State::focused(),
delete_button: button::State::new(),
};
}