From 87efbeace4dd3d650f36d43a35ead589821da919 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 6 Jun 2021 08:22:15 +0200 Subject: [PATCH] Simplification --- app/src/main/java/eu/faircode/email/DB.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/DB.java b/app/src/main/java/eu/faircode/email/DB.java index c5bde21c8c..2e150006bc 100644 --- a/app/src/main/java/eu/faircode/email/DB.java +++ b/app/src/main/java/eu/faircode/email/DB.java @@ -431,16 +431,16 @@ public abstract class DB extends RoomDatabase { " BEGIN" + " UPDATE message SET attachments = attachments + 1" + " WHERE message.id = NEW.message" + - " AND (NEW.encryption IS NULL" + - " AND NOT ((NEW.disposition = 'inline' OR NEW.cid IS NOT NULL) AND NEW.type IN (" + images + ")));" + + " AND NEW.encryption IS NULL" + + " AND NOT ((NEW.disposition = 'inline' OR NEW.cid IS NOT NULL) AND NEW.type IN (" + images + "));" + " END"); db.execSQL("CREATE TRIGGER IF NOT EXISTS attachment_delete" + " AFTER DELETE ON attachment" + " BEGIN" + " UPDATE message SET attachments = attachments - 1" + " WHERE message.id = OLD.message" + - " AND (OLD.encryption IS NULL" + - " AND NOT ((OLD.disposition = 'inline' OR OLD.cid IS NOT NULL) AND OLD.type IN (" + images + ")));" + + " AND OLD.encryption IS NULL" + + " AND NOT ((OLD.disposition = 'inline' OR OLD.cid IS NOT NULL) AND OLD.type IN (" + images + "));" + " END"); }