[geary] Prevent multiple mark-read ops when viewing conversation: Bug #713535



commit 80555184be174b0bf0e093ee63ce89da62d4228c
Author: Jim Nelson <jim yorba org>
Date:   Thu Oct 9 14:38:44 2014 -0700

    Prevent multiple mark-read ops when viewing conversation: Bug #713535
    
    Previously, the code waited for the engine to report that a message
    was manually marked as read to add the state it would need to avoid
    marking the message as read when scrolling.  Now that state is set
    before submitting the op to the engine, meaning continued scrolling
    doesn't trigger more mark operations.

 .../conversation-viewer/conversation-viewer.vala   |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index 140ccc2..ca59430 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -2217,6 +2217,10 @@ public class ConversationViewer : Gtk.Box {
                             body.offset_top + body.offset_height > scroll_top &&
                             body.offset_top + 28 < scroll_top + scroll_height) {  // 28 = 15 padding + 13 
first line of text
                         emails.add(message.id);
+                        
+                        // since it can take some time for the new flags to round-trip back to
+                        // ConversationViewer's signal handlers, mark as manually read here
+                        mark_manual_read(message.id);
                     }
                 }
             } catch (Error error) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]