Fix empty folder/no matching search UI not showing up.
This fixes a regression introduced by commit0ea1fe6c3. * src/engine/app/app-conversation-monitor.vala (ConversationMonitor): Signal scan_complete from the same method call that we signal scan_started, so that a) we know it will get fired, even if no messages are loaded (the issue introduced by0ea1fe6c3) and b) so we can get rid of the inside_scan complexity.
This commit is contained in:
parent
b2bc4e355f
commit
4cc7cf1769
2 changed files with 39 additions and 18 deletions
|
|
@ -56,6 +56,11 @@ class Geary.App.ConversationMonitorTest : TestCase {
|
|||
);
|
||||
Cancellable test_cancellable = new Cancellable();
|
||||
|
||||
bool saw_scan_started = false;
|
||||
bool saw_scan_completed = false;
|
||||
monitor.scan_started.connect(() => { saw_scan_started = true; });
|
||||
monitor.scan_completed.connect(() => { saw_scan_completed = true; });
|
||||
|
||||
this.base_folder.expect_call(
|
||||
"open_async",
|
||||
{ MockObject.int_arg(Folder.OpenFlags.NONE), test_cancellable }
|
||||
|
|
@ -68,11 +73,19 @@ class Geary.App.ConversationMonitorTest : TestCase {
|
|||
);
|
||||
monitor.start_monitoring_async.end(async_result());
|
||||
|
||||
// Process all of the async tasks arising from the open
|
||||
while (this.main_loop.pending()) {
|
||||
this.main_loop.iteration(true);
|
||||
}
|
||||
|
||||
monitor.stop_monitoring_async.begin(
|
||||
test_cancellable, (obj, res) => { async_complete(res); }
|
||||
);
|
||||
monitor.stop_monitoring_async.end(async_result());
|
||||
|
||||
assert_true(saw_scan_started, "scan_started not fired");
|
||||
assert_true(saw_scan_completed, "scan_completed not fired");
|
||||
|
||||
this.base_folder.assert_expectations();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue