[geary: 18/23] Set default parser options directly after init



commit 793f40fc4ee518d9cd98fd870e63293459f7cf9b
Author: Torben <torben letorbi gmail com>
Date:   Mon Dec 16 15:05:37 2019 +0100

    Set default parser options directly after init

 src/engine/rfc822/rfc822.vala | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/engine/rfc822/rfc822.vala b/src/engine/rfc822/rfc822.vala
index 718fae9c..cef728a2 100644
--- a/src/engine/rfc822/rfc822.vala
+++ b/src/engine/rfc822/rfc822.vala
@@ -28,6 +28,7 @@ public void init() {
         return;
 
     GMime.init();
+    GMime.ParserOptions.get_default().set_allow_addresses_without_domain(true);
 
     try {
         invalid_filename_character_re = new Regex("[/\\0]");
@@ -41,9 +42,7 @@ public GMime.FormatOptions get_format_options() {
 }
 
 public GMime.ParserOptions get_parser_options() {
-    GMime.ParserOptions opt = GMime.ParserOptions.get_default().clone();
-    opt.set_allow_addresses_without_domain(true);
-    return opt;
+    return GMime.ParserOptions.get_default().clone();
 }
 
 public string? get_charset() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]