mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-16 22:31:03 +02:00
parent
0914ea3972
commit
ff359f61c2
1 changed files with 10 additions and 4 deletions
|
@ -269,10 +269,16 @@ impl Module<gtk::Box> for LauncherModule {
|
|||
}
|
||||
|
||||
{
|
||||
let items = lock!(items);
|
||||
let items = items.iter();
|
||||
for (_, item) in items {
|
||||
tx.send_update_spawn(LauncherUpdate::AddItem(item.clone()));
|
||||
let items = {
|
||||
let items = lock!(items);
|
||||
items
|
||||
.iter()
|
||||
.map(|(_, item)| item.clone())
|
||||
.collect::<Vec<_>>() // need to collect to be able to drop lock
|
||||
};
|
||||
|
||||
for item in items {
|
||||
tx.send_update(LauncherUpdate::AddItem(item)).await;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue