From 1fc72d0e411a1a817007372cf01ab137c4f22106 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 19 Mar 2019 18:40:41 +0000 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/Core.java | 8 ++++---- 1 file changed, 4 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 d650d82b4c..70e8648101 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1724,9 +1724,6 @@ class Core { .addAction(actionArchive.build()) .addAction(actionTrash.build()); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) - mbuilder.setSound(null); - if (pro) { if (!TextUtils.isEmpty(message.subject)) mbuilder.setContentText(message.subject); @@ -1765,7 +1762,10 @@ class Core { } } - mbuilder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) + mbuilder.setSound(null); + else + mbuilder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN); notifications.add(mbuilder.build()); }