[work]: idk
This commit is contained in:
parent
34dd3e72fb
commit
c1eae15026
1 changed files with 10 additions and 3 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -2222,9 +2222,16 @@ where
|
|||
|
||||
fn add_library() -> Task<Message> {
|
||||
cosmic::Task::future(library::add_db()).then(|res| {
|
||||
Task::perform(Library::new(Arc::new(res.expect("probs"))), |x| {
|
||||
cosmic::Action::App(Message::AddLibrary(x))
|
||||
})
|
||||
Task::perform(
|
||||
Library::new(Arc::new(match res {
|
||||
Ok(db) => db,
|
||||
Err(e) => {
|
||||
error!("{e}");
|
||||
panic!("{e}")
|
||||
}
|
||||
})),
|
||||
|x| cosmic::Action::App(Message::AddLibrary(x)),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue