Fix ConversationMonitor sometimes not loading more from remote

If a FillWindowOperation didn't load a full amount of messages, it just
assumed that there were no more to load. This is not true however when
loading locally, the folder's vector isn't fully expanded, and it gets
to the end of the vector.

This patch fixes the operation to also queue another fill if the
monitor's folder message window is smaller than the folder's total
message count.

Fixes #289
This commit is contained in:
Michael Gratton 2019-04-04 16:57:53 +11:00
parent 29389bc38e
commit 3a44628da9
6 changed files with 56 additions and 13 deletions

View file

@ -46,7 +46,7 @@ public class Geary.MockFolder : Folder, MockObject {
SpecialFolderType type,
ProgressMonitor? monitor) {
this._account = account;
this._properties = properties;
this._properties = properties ?? new MockFolderPoperties();
this._path = path;
this._type = type;
this._opening_monitor = monitor;

View file

@ -0,0 +1,24 @@
/*
* Copyright 2019 Michael Gratton <mike@vee.net>
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
public class Geary.MockFolderPoperties : FolderProperties {
public MockFolderPoperties() {
base(
0,
0,
Trillian.UNKNOWN,
Trillian.UNKNOWN,
Trillian.UNKNOWN,
false,
false,
false
);
}
}