fixed tui flikering

This commit is contained in:
Zastian Pretorius
2022-09-03 11:20:47 +01:00
parent 2193956e8b
commit 2e9874b486

View File

@@ -136,7 +136,6 @@ pub fn anime_ui(token: String) -> Result<(), Box<dyn Error>> {
fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<()> {
let mut ep_select = false;
loop {
terminal.clear()?;
terminal.draw(|f| ui(f, &mut app))?;
if let Event::Key(key) = event::read()? {
@@ -179,6 +178,7 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<(
} else {
title
};
app.anime_id = get_anime_id(&title.replace("-", " "));
app.messages.items.clear();
app.progress =