mirror of
https://github.com/mrfluffy-dev/kami.git
synced 2026-01-17 04:50:32 +00:00
added state check to navigation for images
This commit is contained in:
@@ -190,21 +190,44 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App, conf: Config) -
|
|||||||
KeyCode::Left => app.messages.unselect(),
|
KeyCode::Left => app.messages.unselect(),
|
||||||
KeyCode::Char('h') => app.messages.unselect(),
|
KeyCode::Char('h') => app.messages.unselect(),
|
||||||
KeyCode::Down => {
|
KeyCode::Down => {
|
||||||
|
//match ep_select
|
||||||
|
match ep_select {
|
||||||
|
true => {
|
||||||
|
app.messages.next();
|
||||||
|
}
|
||||||
|
false => {
|
||||||
app.messages.next();
|
app.messages.next();
|
||||||
change_image(&conf, &app);
|
change_image(&conf, &app);
|
||||||
}
|
}
|
||||||
KeyCode::Char('j') => {
|
|
||||||
app.messages.next();
|
|
||||||
change_image(&conf, &app)
|
|
||||||
}
|
}
|
||||||
KeyCode::Up => {
|
}
|
||||||
|
KeyCode::Char('j') => match ep_select {
|
||||||
|
true => {
|
||||||
|
app.messages.next();
|
||||||
|
}
|
||||||
|
false => {
|
||||||
|
app.messages.next();
|
||||||
|
change_image(&conf, &app);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
KeyCode::Up => match ep_select {
|
||||||
|
true => {
|
||||||
|
app.messages.previous();
|
||||||
|
}
|
||||||
|
false => {
|
||||||
app.messages.previous();
|
app.messages.previous();
|
||||||
change_image(&conf, &app);
|
change_image(&conf, &app);
|
||||||
}
|
}
|
||||||
KeyCode::Char('k') => {
|
},
|
||||||
|
KeyCode::Char('k') => match ep_select {
|
||||||
|
true => {
|
||||||
app.messages.previous();
|
app.messages.previous();
|
||||||
change_image(&conf, &app)
|
|
||||||
}
|
}
|
||||||
|
false => {
|
||||||
|
app.messages.previous();
|
||||||
|
change_image(&conf, &app);
|
||||||
|
}
|
||||||
|
},
|
||||||
//if KeyCode::Enter => {
|
//if KeyCode::Enter => {
|
||||||
KeyCode::Enter => {
|
KeyCode::Enter => {
|
||||||
if ep_select == false {
|
if ep_select == false {
|
||||||
|
|||||||
Reference in New Issue
Block a user