mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
Handle library updates from main screen
This commit is contained in:
parent
cb3e958f1b
commit
24f493d7d6
1 changed files with 23 additions and 15 deletions
|
|
@ -153,6 +153,9 @@ impl Screen<(), ()> for MainScreen {
|
|||
// Load the content asynchronously.
|
||||
|
||||
spawn!(@clone this, async move {
|
||||
loop {
|
||||
this.navigator.reset();
|
||||
|
||||
let mut poes = Vec::new();
|
||||
|
||||
let persons = this.handle.backend.db().get_persons().await.unwrap();
|
||||
|
|
@ -171,6 +174,11 @@ impl Screen<(), ()> for MainScreen {
|
|||
this.poe_list.update(length);
|
||||
|
||||
this.stack.set_visible_child_name("content");
|
||||
|
||||
if this.handle.backend.library_update().await.is_err() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue