status-area: Handle clients that don't provide icon_name/icon_pixmap
It seems some clients expose the properties and leave them empty, but others just provide either one on its own. This fixes clients like Mattermost.
This commit is contained in:
parent
4103b2e359
commit
d5aa2f3252
1 changed files with 3 additions and 2 deletions
|
|
@ -33,10 +33,11 @@ impl StatusNotifierItem {
|
|||
.build()
|
||||
.await?;
|
||||
|
||||
let icon_name = item_proxy.icon_name().await?;
|
||||
let icon_name = item_proxy.icon_name().await.unwrap_or_default();
|
||||
let icon_pixmap = item_proxy
|
||||
.icon_pixmap()
|
||||
.await?
|
||||
.await
|
||||
.unwrap_or_default()
|
||||
.into_iter()
|
||||
.max_by_key(|i| (i.width, i.height))
|
||||
.map(|mut i| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue