1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 14:51:04 +02:00

fix(launcher): regression - favourites in wrong order

Fixes #997
This commit is contained in:
Jake Stanger 2025-05-20 15:41:04 +01:00
parent 0914ea3972
commit ff359f61c2
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -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;
}
}