Added horizontal scrolling for long movie titles, a refresh key, and fixed the network issues so that network requests are sent once every 20 seconds by default to not stress out the server.

This commit is contained in:
2023-08-08 10:50:06 -06:00
parent 7f3dd18478
commit 514fd2244a
12 changed files with 337 additions and 205 deletions
+5 -3
View File
@@ -92,9 +92,11 @@ fn draw_error<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, area: Rect) {
.style(style_failure())
.borders(Borders::ALL);
if app.error.text.len() > area.width as usize {
app.error.scroll_left();
}
app.error.scroll_left_or_reset(
area.width as usize,
true,
app.tick_count % app.ticks_until_scroll == 0,
);
let mut text = Text::from(app.error.to_string());
text.patch_style(style_failure());