[geary/wip/infinte-filling-redux: 28/28] Make App.ReseedOperation alway check the window for re-filling



commit 006b4c5ca515a317081c5ac6a642ae20661effde
Author: Michael Gratton <mike vee net>
Date:   Mon Aug 26 13:28:10 2019 +1000

    Make App.ReseedOperation alway check the window for re-filling
    
    When the remote re-opens, new messages may have become available that
    could be added to the conversation set if the window is not yet full.
    Thus always check whether a fill operation should be queued.

 .../app/conversation-monitor/app-reseed-operation.vala    | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/engine/app/conversation-monitor/app-reseed-operation.vala 
b/src/engine/app/conversation-monitor/app-reseed-operation.vala
index 3d3d7d47..c3434336 100644
--- a/src/engine/app/conversation-monitor/app-reseed-operation.vala
+++ b/src/engine/app/conversation-monitor/app-reseed-operation.vala
@@ -22,10 +22,7 @@ private class Geary.App.ReseedOperation : ConversationOperation {
     }
 
     public override async void execute_async() throws Error {
-        // Clear the fill flag since more messages may have appeared
-        // after coming online.
-        this.monitor.fill_complete = false;
-
+        // Check for and load any newly appended messages
         EmailIdentifier? earliest_id = this.monitor.window_lowest;
         if (earliest_id != null) {
             debug("Reseeding starting from Email ID %s on opened %s",
@@ -38,11 +35,13 @@ private class Geary.App.ReseedOperation : ConversationOperation {
                 int.MAX,
                 Folder.ListFlags.OLDEST_TO_NEWEST | Folder.ListFlags.INCLUDING_ID
             );
-        } else {
-            // No conversations are present, so do a check to get the
-            // side effect of queuing a fill operation.
-            this.monitor.check_window_count();
         }
+
+        // Clear the fill flag since more messages may have appeared
+        // after coming online, and do a check to get them filled if
+        // needed.
+        this.monitor.fill_complete = false;
+        this.monitor.check_window_count();
     }
 
 }


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