mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Close source selector
This commit is contained in:
parent
d410be75dc
commit
30584cdf2f
1 changed files with 4 additions and 7 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use super::import_screen::ImportScreen;
|
||||
use super::medium_editor::MediumEditor;
|
||||
use crate::navigator::{NavigationHandle, Screen};
|
||||
use crate::widgets::Widget;
|
||||
use gettextrs::gettext;
|
||||
|
|
@ -66,10 +65,8 @@ impl Screen<(), ()> for SourceSelector {
|
|||
spawn!(@clone this, async move {
|
||||
match ImportSession::folder(PathBuf::from(path)).await {
|
||||
Ok(session) => {
|
||||
// push!(this.handle, MediumEditor, session).await;
|
||||
// this.handle.pop(Some(()));
|
||||
|
||||
push!(this.handle, ImportScreen, session).await;
|
||||
let result = push!(this.handle, ImportScreen, session).await;
|
||||
this.handle.pop(result);
|
||||
}
|
||||
Err(err) => {
|
||||
this.status_page.set_description(Some(&err.to_string()));
|
||||
|
|
@ -91,8 +88,8 @@ impl Screen<(), ()> for SourceSelector {
|
|||
spawn!(@clone this, async move {
|
||||
match ImportSession::audio_cd().await {
|
||||
Ok(session) => {
|
||||
push!(this.handle, MediumEditor, session).await;
|
||||
this.handle.pop(Some(()));
|
||||
let result = push!(this.handle, ImportScreen, session).await;
|
||||
this.handle.pop(result);
|
||||
}
|
||||
Err(err) => {
|
||||
this.status_page.set_description(Some(&err.to_string()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue