1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-16 14:21:03 +02:00

Merge pull request #998 from JakeStanger/fix/launcher-favourites

fix(launcher): regression - favourites in wrong order
This commit is contained in:
Jake Stanger 2025-05-20 16:03:48 +01:00 committed by GitHub
commit b8d87eb9a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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