simplified logic
This commit is contained in:
parent
7fb519e70b
commit
f4132d4125
@ -78,15 +78,14 @@ impl Ui {
|
|||||||
Ok(UiEvent::TagInput(key)) => {
|
Ok(UiEvent::TagInput(key)) => {
|
||||||
let (fetch_new, mut tags) = {
|
let (fetch_new, mut tags) = {
|
||||||
let mut ui_data = ui.lock().unwrap();
|
let mut ui_data = ui.lock().unwrap();
|
||||||
let fetch_new = if (key == Key::Down || key == Key::Char('j'))
|
if (key == Key::Down || key == Key::Char('j'))
|
||||||
&& ui_data.tags.at_end_of_list()
|
&& ui_data.tags.at_end_of_list()
|
||||||
{
|
{
|
||||||
ui_data.info.set_text("Fetching more tags...");
|
ui_data.info.set_text("Fetching more tags...");
|
||||||
true
|
(true, ui_data.tags.clone())
|
||||||
} else {
|
} else {
|
||||||
false
|
(false, ui_data.tags.clone())
|
||||||
};
|
}
|
||||||
(fetch_new, ui_data.tags.clone())
|
|
||||||
};
|
};
|
||||||
tags.handle_input(key).await;
|
tags.handle_input(key).await;
|
||||||
let mut ui = ui.lock().unwrap();
|
let mut ui = ui.lock().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user