From 006b4c5ca515a317081c5ac6a642ae20661effde Mon Sep 17 00:00:00 2001 From: Michael Gratton Date: Mon, 26 Aug 2019 13:28:10 +1000 Subject: [PATCH] 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-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(); } }