ElyPDF: an OS permission error shows as an error, never a missing text key (P-01); component library f834f55

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 10:58:47 -04:00
1 parent ab85673eea
commit 943411fb1a
17 files changed
+90 -25

No files matched your search

+3 -3
View File
@@ -46,9 +46,9 @@ fn masked(window: &mut Window, cx: &mut Context<Viewer>) -> Entity<TextInput> {
impl Viewer {
/// A refusal names what is missing.
pub(crate) fn failed(&self, error: &io::Error, cx: &mut App) {
match error.kind() {
io::ErrorKind::PermissionDenied => self.toast(crate::view::restricted(&error.to_string(), cx), Severity::Warning, cx),
_ => self.panel_failed(&error.to_string(), cx),
match ely_pdf_engine::refused(error) {
Some(needed) => self.toast(crate::view::restricted(needed, cx), Severity::Warning, cx),
None => self.panel_failed(&error.to_string(), cx),
}
}