import: Use watch channel for state updates

This commit is contained in:
Elias Projahn 2021-03-28 17:28:49 +02:00
parent e43486367b
commit 690a150727
4 changed files with 61 additions and 27 deletions

View file

@ -135,19 +135,6 @@ impl Screen<Arc<ImportSession>, ()> for MediumEditor {
this.handle.pop(None);
}));
spawn!(@clone this, async move {
match this.session.copy().await {
Err(err) => {
this.disc_status_page.set_description(Some(&err.to_string()));
this.widget.set_visible_child_name("disc_error");
},
Ok(_) => {
this.done_stack.set_visible_child(&this.done);
this.done_button.set_sensitive(true);
}
}
});
this
}
}