From 9fde8fa0b513bc430e72824671f0706fda177d06 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 10 Jan 2019 07:41:29 +0000 Subject: [PATCH] Create notification channel on import --- app/src/main/java/eu/faircode/email/FragmentSetup.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index 6080a87632..fd6cafee9c 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -1164,6 +1164,10 @@ public class FragmentSetup extends FragmentEx { account.id = db.account().insertAccount(account); Log.i("Imported account=" + account.name); + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) + if (account.notify) + account.createNotificationChannel(context); + JSONArray jidentities = (JSONArray) jaccount.get("identities"); for (int i = 0; i < jidentities.length(); i++) { JSONObject jidentity = (JSONObject) jidentities.get(i);