client: Application.MainWindow: Always log error in the background

convo.get_count() will not be zero when an email is loaded while being
removed.
This commit is contained in:
Cédric Bellegarde 2023-07-23 17:43:59 +02:00 committed by Niels De Graef
parent cb60bdd3ea
commit d7ec8bafee
2 changed files with 6 additions and 12 deletions

View file

@ -1620,20 +1620,13 @@ public class Application.MainWindow :
);
} catch (Geary.EngineError.NOT_FOUND err) {
// The first interesting email from the
// conversation wasn't found. If the
// conversation has completely evaporated by
// now then fine, otherwise throw the
// error. This happens e.g. in the drafts
// folder, there is a race between the
// conversation wasn't found.
// This happens:
// - in the drafts folder, there is a race between the
// composer being discarded and the draft
// itself disappearing
if (convo.get_count() == 0) {
debug("Ignoring not found error: %s", err.message);
} else {
handle_error(
convo.base_folder.account.information, err
);
}
// - when message has been removed while being loaded
debug("Ignoring not found error: %s", err.message);
} catch (GLib.IOError.CANCELLED err) {
// All good
} catch (GLib.Error err) {

View file

@ -2616,3 +2616,4 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
}
}