mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57: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::import_screen::ImportScreen;
|
||||||
use super::medium_editor::MediumEditor;
|
|
||||||
use crate::navigator::{NavigationHandle, Screen};
|
use crate::navigator::{NavigationHandle, Screen};
|
||||||
use crate::widgets::Widget;
|
use crate::widgets::Widget;
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
|
@ -66,10 +65,8 @@ impl Screen<(), ()> for SourceSelector {
|
||||||
spawn!(@clone this, async move {
|
spawn!(@clone this, async move {
|
||||||
match ImportSession::folder(PathBuf::from(path)).await {
|
match ImportSession::folder(PathBuf::from(path)).await {
|
||||||
Ok(session) => {
|
Ok(session) => {
|
||||||
// push!(this.handle, MediumEditor, session).await;
|
let result = push!(this.handle, ImportScreen, session).await;
|
||||||
// this.handle.pop(Some(()));
|
this.handle.pop(result);
|
||||||
|
|
||||||
push!(this.handle, ImportScreen, session).await;
|
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
this.status_page.set_description(Some(&err.to_string()));
|
this.status_page.set_description(Some(&err.to_string()));
|
||||||
|
|
@ -91,8 +88,8 @@ impl Screen<(), ()> for SourceSelector {
|
||||||
spawn!(@clone this, async move {
|
spawn!(@clone this, async move {
|
||||||
match ImportSession::audio_cd().await {
|
match ImportSession::audio_cd().await {
|
||||||
Ok(session) => {
|
Ok(session) => {
|
||||||
push!(this.handle, MediumEditor, session).await;
|
let result = push!(this.handle, ImportScreen, session).await;
|
||||||
this.handle.pop(Some(()));
|
this.handle.pop(result);
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
this.status_page.set_description(Some(&err.to_string()));
|
this.status_page.set_description(Some(&err.to_string()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue