Use trash-rs' is_empty more

Fixes two instances where enumerating trash items isn't needed.
This commit is contained in:
Josh Megnauth 2025-07-22 02:52:44 -04:00 committed by Jeremy Soller
parent 3390ef7ea8
commit 35a9bd5347
2 changed files with 9 additions and 9 deletions

View file

@ -160,7 +160,7 @@ pub fn context_menu<'a>(
) => {
if selected_trash_only {
children.push(menu_item(fl!("open"), Action::Open).into());
if tab::trash_entries() > 0 {
if !trash::os_limited::is_empty().unwrap_or(true) {
children.push(menu_item(fl!("empty-trash"), Action::EmptyTrash).into());
}
} else if let Some(entry) = selected_desktop_entry {