Skip to content

Commit

Permalink
feat: (wip) handle removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Anomalocaridid committed Oct 14, 2024
1 parent 12f7f9b commit 77e61ff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/apps/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,17 @@ impl MimeApps {
.or_else(|_| self.get_handler_from_added_associations(mime))
}

pub fn is_removed_association(
&self,
mime: &Mime,
handler: &DesktopHandler,
) -> bool {
self.removed_associations
.get(mime)
.map(|list| list.contains(handler))
.unwrap_or(false)
}

/// Select handler from given list, possibly using the selector
#[mutants::skip] // Cannot entirely test, namely cannot test selector or filtering
fn select_handler(
Expand Down

0 comments on commit 77e61ff

Please sign in to comment.