Handle idle time between fetch results #212

Merged
wojtek merged 18 commits from 211---handle-idle-time-between-fetch-results into main 2024-09-08 23:23:53 +02:00
Showing only changes of commit 706e30f587 - Show all commits

View File

@ -85,12 +85,15 @@ fn with<Database: IDatabase + 'static, Library: ILibrary + 'static>(
let musicbrainz = MusicBrainz::new(client); let musicbrainz = MusicBrainz::new(client);
let channel = EventChannel::new(); let channel = EventChannel::new();
let listener = EventListener::new(channel.sender()); let listener_sender = channel.sender();
let app_sender = channel.sender();
let app = App::new(music_hoard, musicbrainz, channel.sender()); let listener = EventListener::new(listener_sender);
let handler = EventHandler::new(channel.receiver());
let app = App::new(music_hoard, musicbrainz, app_sender);
let ui = Ui; let ui = Ui;
let handler = EventHandler::new(channel.receiver());
// Run the TUI application. // Run the TUI application.
Tui::run(terminal, app, ui, handler, listener).expect("failed to run tui"); Tui::run(terminal, app, ui, handler, listener).expect("failed to run tui");