Use trash-rs' is_empty more
Fixes two instances where enumerating trash items isn't needed.
This commit is contained in:
parent
3390ef7ea8
commit
35a9bd5347
2 changed files with 9 additions and 9 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue