[geary/mjog/draft-errors: 2/6] Composer.Widget: Suppress unsupported draft folder messages
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/draft-errors: 2/6] Composer.Widget: Suppress unsupported draft folder messages
- Date: Sun, 25 Oct 2020 08:14:26 +0000 (UTC)
commit 6f1f94e5546c8df1b7627ebcd70edae8eab96fc6
Author: Michael Gratton <mike vee net>
Date: Sun Oct 25 17:05:03 2020 +1100
Composer.Widget: Suppress unsupported draft folder messages
There's nothing people can do about the draft folder being unusable
for saving drafts, so just log a debug message and continue.
Fixes #858
src/client/composer/composer-widget.vala | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 9148a88e2..fe29011d0 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -1533,6 +1533,7 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
: new Geary.EmailFlags()
);
+ bool opened = false;
try {
var new_manager = yield new Geary.App.DraftManager(
this.sender_context.account,
@@ -1548,7 +1549,13 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
new_manager.fatal
.connect(on_draft_manager_fatal);
this.draft_manager = new_manager;
+ opened = true;
debug("Draft manager opened");
+ } catch (Geary.EngineError.UNSUPPORTED err) {
+ debug(
+ "Drafts folder unsupported, no drafts will be saved: %s",
+ err.message
+ );
} catch (GLib.Error err) {
this.header.show_save_and_close = false;
throw err;
@@ -1556,8 +1563,10 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
this.draft_manager_opening = null;
}
- update_draft_state();
- this.header.show_save_and_close = true;
+ this.header.show_save_and_close = opened;
+ if (opened) {
+ update_draft_state();
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]