1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 14:51:04 +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 = {
let items = lock!(items); let items = lock!(items);
let items = items.iter(); items
for (_, item) in items { .iter()
tx.send_update_spawn(LauncherUpdate::AddItem(item.clone())); .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;
} }
} }