mirror of
https://github.com/mrfluffy-dev/kami.git
synced 2026-01-17 04:50:32 +00:00
fixed tui flikering
This commit is contained in:
@@ -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<()> {
|
fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<()> {
|
||||||
let mut ep_select = false;
|
let mut ep_select = false;
|
||||||
loop {
|
loop {
|
||||||
terminal.clear()?;
|
|
||||||
terminal.draw(|f| ui(f, &mut app))?;
|
terminal.draw(|f| ui(f, &mut app))?;
|
||||||
|
|
||||||
if let Event::Key(key) = event::read()? {
|
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 {
|
} else {
|
||||||
title
|
title
|
||||||
};
|
};
|
||||||
|
|
||||||
app.anime_id = get_anime_id(&title.replace("-", " "));
|
app.anime_id = get_anime_id(&title.replace("-", " "));
|
||||||
app.messages.items.clear();
|
app.messages.items.clear();
|
||||||
app.progress =
|
app.progress =
|
||||||
|
|||||||
Reference in New Issue
Block a user