Handle error from trash::os_limited::is_empty

This commit is contained in:
Jeremy Soller 2025-04-21 13:34:16 -06:00
parent bc1b68153b
commit 90fc680666
No known key found for this signature in database
GPG key ID: 670FDFB5428E05CA

View file

@ -289,7 +289,7 @@ pub fn trash_entries() -> usize {
}
pub fn trash_icon(icon_size: u16) -> widget::icon::Handle {
widget::icon::from_name(if !trash::os_limited::is_empty() {
widget::icon::from_name(if !trash::os_limited::is_empty().unwrap_or(true) {
"user-trash-full"
} else {
"user-trash"
@ -299,7 +299,7 @@ pub fn trash_icon(icon_size: u16) -> widget::icon::Handle {
}
pub fn trash_icon_symbolic(icon_size: u16) -> widget::icon::Handle {
widget::icon::from_name(if !trash::os_limited::is_empty() {
widget::icon::from_name(if !trash::os_limited::is_empty().unwrap_or(true) {
"user-trash-full-symbolic"
} else {
"user-trash-symbolic"