From 6107511d9415d8c55c26a7125b2ee4a56e2cc645 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 10 Jun 2022 13:01:12 +0200 Subject: [PATCH] Fixed notification view groups --- .../faircode/email/FragmentOptionsNotifications.java | 11 ++++++++--- .../res/layout/fragment_options_notifications.xml | 10 ++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java b/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java index adb8ea81c8..b037d1cb1f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java @@ -111,7 +111,8 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared private TextView tvNoChannels; private Group grpChannel; - private Group grpNotification; + private Group grpProperties; + private Group grpBackground; private final static String[] RESET_OPTIONS = new String[]{ "notify_newest_first", @@ -191,7 +192,8 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared tvNoChannels = view.findViewById(R.id.tvNoChannels); grpChannel = view.findViewById(R.id.grpChannel); - grpNotification = view.findViewById(R.id.grpNotification); + grpProperties = view.findViewById(R.id.grpProperties); + grpBackground = view.findViewById(R.id.grpBackground); setOptions(); @@ -586,7 +588,10 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared tvNoChannels.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.VISIBLE : View.GONE); grpChannel.setVisibility(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ? View.VISIBLE : View.GONE); - grpNotification.setVisibility( + grpProperties.setVisibility( + Build.VERSION.SDK_INT < Build.VERSION_CODES.O || BuildConfig.DEBUG + ? View.VISIBLE : View.GONE); + grpBackground.setVisibility( Build.VERSION.SDK_INT < Build.VERSION_CODES.O || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); diff --git a/app/src/main/res/layout/fragment_options_notifications.xml b/app/src/main/res/layout/fragment_options_notifications.xml index 96d3ce5912..393d8a09fe 100644 --- a/app/src/main/res/layout/fragment_options_notifications.xml +++ b/app/src/main/res/layout/fragment_options_notifications.xml @@ -415,10 +415,10 @@ app:constraint_referenced_ids="tvManageHint,btnManageDefault,tvManageDefaultHint,btnManageService,tvManageServiceHint" /> + app:constraint_referenced_ids="swLight,btnSound" /> @@ -827,6 +827,12 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/tvNoGrouping" /> + +