fix(tui): stop raw prints from corrupting the TUI

Log lines were painting over the alternate-screen TUI because some
messages bypassed the buffered logger and wrote straight to the
terminal:

- a live println! in GetPeerAddressHandler fired on every peer-address
  lookup (i.e. constantly while browsing/downloading) — routed to the
  buffered debug! logger.
- the TUI's error handlers used eprintln! in the render loop and in
  background search/download worker threads — routed to the buffered
  warn! logger so failures no longer smear the screen.

The logger already defers to a buffer while the TUI holds the screen; the
fix is simply to go through it instead of print!/eprintln!.
This commit is contained in:
michel
2026-07-19 21:22:38 +02:00
parent 34babf5808
commit 9f74300c7a
3 changed files with 16 additions and 11 deletions
+3 -1
View File
@@ -501,7 +501,9 @@ pub fn show_multi_download_progress(
let _ = tx.send((download, receiver));
}
Err(e) => {
eprintln!("Failed to start download for {filename}: {e}");
soulseek_rs::warn!(
"Failed to start download for {filename}: {e}"
);
}
}
}