mirror of
https://github.com/forkless/NotAlterra.git
synced 2026-08-17 08:49:50 +02:00
Restore 100ms poll, whale on main menu only
This commit is contained in:
+1
-1
@@ -1013,7 +1013,7 @@ fn get_config_path<B: Backend>(_terminal: &mut Terminal<B>, app: &mut App) -> Re
|
||||
/// Key-repeat and initial press are both accepted.
|
||||
fn read_key_event() -> Result<crossterm::event::KeyEvent> {
|
||||
loop {
|
||||
if event::poll(std::time::Duration::from_millis(16))? {
|
||||
if event::poll(std::time::Duration::from_millis(100))? {
|
||||
if let Event::Key(key) = event::read()? {
|
||||
if key.kind != KeyEventKind::Release {
|
||||
return Ok(key);
|
||||
|
||||
@@ -286,7 +286,6 @@ pub fn draw_sub_menu(
|
||||
|
||||
draw_select_list(f, chunks[2], items, descs, "↑/↓ navigate Enter select Esc back", state);
|
||||
draw_status_bar(f, chunks[3], app);
|
||||
draw_whale_separator(f, chunks[3], app);
|
||||
}
|
||||
|
||||
/// Draw a simple text screen with a "press any key" prompt.
|
||||
@@ -307,7 +306,6 @@ pub fn draw_text_screen(
|
||||
))
|
||||
.alignment(Alignment::Center);
|
||||
f.render_widget(prompt_p, chunks[3]);
|
||||
draw_whale_separator(f, chunks[3], app);
|
||||
}
|
||||
|
||||
/// Draw a file/folder picker list.
|
||||
@@ -337,7 +335,6 @@ pub fn draw_picker_with_info(
|
||||
let prompt = "↑/↓ navigate Enter select Esc cancel";
|
||||
draw_select_list_with_info(f, chunks[2], items, descs, prompt, state, selected_info);
|
||||
draw_status_bar(f, chunks[3], app);
|
||||
draw_whale_separator(f, chunks[3], app);
|
||||
}
|
||||
|
||||
// ── internal drawing helpers ───────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user