From 194d954c52596e5db06b5d58bc76cd51315aafe5 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 29 Dec 2021 22:04:04 +0100 Subject: [PATCH] Reduced logging --- app/src/main/java/eu/faircode/email/Core.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index a47a7453b4..8fa813ad92 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1989,11 +1989,15 @@ class Core { if (TextUtils.isEmpty(keyword)) throw new IllegalArgumentException("keyword missing"); - if (folder.read_only) - throw new IllegalArgumentException(folder.name + " read-only"); + if (folder.read_only) { + Log.w(folder.name + " read-only"); + return; + } - if (!ifolder.getPermanentFlags().contains(Flags.Flag.USER)) - throw new IllegalArgumentException(folder.name + " has no keywords"); + if (!ifolder.getPermanentFlags().contains(Flags.Flag.USER)) { + Log.w(folder.name + " has no keywords"); + return; + } Message[] imessages = ifolder.search(new MessageIDTerm(msgid)); if (imessages == null || imessages.length == 0)