* src/engine/app/app-conversation-monitor.vala (ConversationMonitor): Don't check the folder blacklist for external folder signals when the signal is received, do it when the operation is executed so it's fresh. * src/engine/app/conversation-monitor/app-fill-window-operation.vala (FillWindowOperation): Only re-fill the conversation if we get a full load, anything else means we hit the end of the folder. * test/engine/app/app-conversation-monitor-test.vala: New unit tests for ConversationMonitor. * test/engine/api/geary-account-mock.vala, test/engine/api/geary-folder-mock.vala: Mix in MockObject mock up all method calls. * test/engine/api/geary-email-identifier-mock.vala: Fix the comparator method when the other instance is null.
24 lines
609 B
Vala
24 lines
609 B
Vala
/*
|
|
* Copyright 2017 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.MockEmailIdentifer : EmailIdentifier {
|
|
|
|
|
|
private int id;
|
|
|
|
|
|
public MockEmailIdentifer(int id) {
|
|
base(id.to_string());
|
|
this.id = id;
|
|
}
|
|
|
|
public override int natural_sort_comparator(Geary.EmailIdentifier other) {
|
|
MockEmailIdentifer? other_mock = other as MockEmailIdentifer;
|
|
return (other_mock == null) ? 1 : this.id - other_mock.id;
|
|
}
|
|
|
|
}
|