improv(minimize): simplify wayland subscription
Removes the redundant unbounded channel and forwards the subscription's sender directly to the wayland handler.
This commit is contained in:
parent
2c79ca44e2
commit
0ce07ffac3
3 changed files with 46 additions and 97 deletions
|
|
@ -147,7 +147,10 @@ impl cosmic::Application for Minimize {
|
|||
self.apps.push((handle, info, data, None));
|
||||
}
|
||||
}
|
||||
ToplevelUpdate::Remove(handle) => self.apps.retain(|a| a.0 != handle),
|
||||
ToplevelUpdate::Remove(handle) => {
|
||||
self.apps.retain(|a| a.0 != handle);
|
||||
self.apps.shrink_to_fit();
|
||||
}
|
||||
},
|
||||
WaylandUpdate::Image(handle, img) => {
|
||||
if let Some(pos) = self.apps.iter().position(|a| a.0 == handle) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue