Minor fix to last commit

This commit is contained in:
Chris Heywood 2020-01-10 18:08:37 +01:00
parent ae19398944
commit 43ecc35298

View file

@ -103,13 +103,13 @@ private class Geary.ImapEngine.AccountSynchronizer :
} }
} }
private void old_messages_background_cleanup(GLib.Cancellable cancellable) { private void old_messages_background_cleanup(GLib.Cancellable? cancellable) {
if (this.account.is_open()) { if (this.account.is_open()) {
SyncDetachMonitor monitor = new SyncDetachMonitor(); SyncDetachMonitor monitor = new SyncDetachMonitor();
send_all(this.account.list_folders(), false, true, monitor); send_all(this.account.list_folders(), false, true, monitor);
monitor.initialised = true; monitor.initialised = true;
monitor.completed.connect((messages_detached) => { monitor.completed.connect((messages_detached) => {
if (cancellable.is_cancelled()) if (cancellable != null && cancellable.is_cancelled())
return; return;
// Run GC. Reap is forced if messages were detached. Vacuum // Run GC. Reap is forced if messages were detached. Vacuum