ElyPDF: failed reads stay unread until an edit; a save stales a signature read (P-08)
This commit is contained in:
9 files changed
+180
-23
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user