ElyPDF: failed reads stay unread until an edit; a save stales a signature read (P-08)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 23:26:40 -04:00
1 parent 547dbf2cc5
commit bd7bc46d8c
9 files changed
+180 -23

No files matched your search

+3
View File
@@ -149,6 +149,7 @@ impl PdfView {
}
self.marks = fresh.marks;
self.failed.clear();
self.unread.clear();
self.text.clear();
self.asking_text.clear();
self.thumbs_failed.clear();
@@ -172,8 +173,10 @@ impl PdfView {
/// The file now holds history `mark`.
pub fn saved(&mut self, mark: &str, cx: &mut Context<Self>) {
self.saved = mark.to_string();
self.saves += 1;
// The file changed; read it again.
self.signatures = None;
self.unread.retain(|unread| !matches!(unread, crate::view::Unread::Signatures(_)));
cx.emit(Reported);
}