From 657284ab012cdec7023269f28bc2d49e4a9fb992 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 Jan 2021 16:38:16 +0100 Subject: [PATCH 1/4] Small layout improvement --- app/src/main/java/eu/faircode/email/FragmentSetup.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index 86beb289c6..f73abed352 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -27,6 +27,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.graphics.Paint; +import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.net.ConnectivityManager; import android.net.Uri; @@ -427,6 +428,7 @@ public class FragmentSetup extends FragmentBase { tvDozeDone.setText(ignoring ? R.string.title_setup_done : R.string.title_setup_to_do); tvDozeDone.setTextColor(ignoring ? textColorPrimary : colorWarning); + tvDozeDone.setTypeface(tvDozeDone.getTypeface(), ignoring ? Typeface.NORMAL : Typeface.BOLD); tvDozeDone.setCompoundDrawablesWithIntrinsicBounds(ignoring ? check : null, null, null, null); // https://developer.android.com/training/basics/network-ops/data-saver.html @@ -456,6 +458,7 @@ public class FragmentSetup extends FragmentBase { tvPermissionsDone.setText(granted ? R.string.title_setup_done : R.string.title_setup_to_do); tvPermissionsDone.setTextColor(granted ? textColorPrimary : colorWarning); + tvPermissionsDone.setTypeface(tvPermissionsDone.getTypeface(), granted ? Typeface.NORMAL : Typeface.BOLD); tvPermissionsDone.setCompoundDrawablesWithIntrinsicBounds(granted ? check : null, null, null, null); btnPermissions.setEnabled(!granted); } From 71b0a29ca982b7fdfa0d2b3f56aa38093f7cd039 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 Jan 2021 17:24:45 +0100 Subject: [PATCH 2/4] Small layout improvement --- app/src/main/res/layout/fragment_setup.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/layout/fragment_setup.xml b/app/src/main/res/layout/fragment_setup.xml index e323bcb20e..3e004ba124 100644 --- a/app/src/main/res/layout/fragment_setup.xml +++ b/app/src/main/res/layout/fragment_setup.xml @@ -5,6 +5,7 @@ android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="match_parent" + android:fadeScrollbars="false" android:paddingStart="6dp" android:paddingTop="12dp" android:paddingEnd="6dp" @@ -102,7 +103,7 @@ android:contentDescription="@string/title_setup_help" android:padding="6dp" android:scaleType="fitCenter" - android:tint="?attr/colorWarning" + android:tint="?attr/colorAccent" android:tooltipText="@string/title_setup_help" app:layout_constraintBottom_toBottomOf="@id/btnQuick" app:layout_constraintEnd_toEndOf="parent" From 507c098a4c773431cb8996f7221c2e6f7ec9647e Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 Jan 2021 19:00:56 +0100 Subject: [PATCH 3/4] Updated material --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index d652d5328a..72320811e4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -243,7 +243,7 @@ dependencies { def recyclerview_version = "1.2.0-beta01" def coordinatorlayout_version = "1.1.0" def constraintlayout_version = "2.0.2" - def material_version = "1.3.0-beta01" + def material_version = "1.3.0-rc01" def browser_version = "1.3.0" def lbm_version = "1.0.0" def swiperefresh_version = "1.2.0-alpha01" From 1b65c7a40e94e7bfb368a45b2de587b6fe793063 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 Jan 2021 19:02:55 +0100 Subject: [PATCH 4/4] Properly handle deny contact permissions --- app/src/main/java/eu/faircode/email/FragmentSetup.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index f73abed352..873ecc8203 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -446,10 +446,8 @@ public class FragmentSetup extends FragmentBase { @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { for (int i = 0; i < permissions.length; i++) - if (grantResults[i] == PackageManager.PERMISSION_GRANTED) { - if (Manifest.permission.READ_CONTACTS.equals(permissions[i])) - setContactsPermission(true); - } + if (Manifest.permission.READ_CONTACTS.equals(permissions[i])) + setContactsPermission(grantResults[i] == PackageManager.PERMISSION_GRANTED); } private void setContactsPermission(boolean granted) {