From a85797064aba4a3f65c292994b2f9063aa9052a8 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 26 Sep 2018 11:50:45 +0000 Subject: [PATCH] Fixed warnings --- .idea/caches/build_file_checksums.ser | Bin 588 -> 588 bytes app/build.gradle | 4 ++++ .../main/java/eu/faircode/email/DaoFolder.java | 2 +- .../java/eu/faircode/email/FragmentAccount.java | 3 +-- .../java/eu/faircode/email/FragmentMessage.java | 11 +++++++---- .../eu/faircode/email/FragmentMessages.java | 4 ++-- app/src/main/res/layout/item_log.xml | 2 +- colorpicker | 2 +- 8 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 230123017153c5799043005eb6bcb554b66c3f19..72584adb43687874e224e97b54ae16de2c5be053 100644 GIT binary patch delta 59 zcmV-B0L1^y1k41Gm;@EEfOwIds}q7*j3^Ct8umb>P`^T-B;a%a43jYd77&pU8meUc RhpA0OdYhklm(r7f0nE{t7}o#* delta 59 zcmV-B0L1^y1k41Gm;?mplOmCvs}ts$r!nS%)*@l`WKMZq0*!P443jYd77(m9vd>>$ R6S_!w8Q!&@@F$ai0n7-48P@;+ diff --git a/app/build.gradle b/app/build.gradle index 844b9c4450..6d355a87d2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,6 +17,10 @@ android { } } + lintOptions { + disable 'MissingTranslation' + } + buildTypes { release { debuggable = false diff --git a/app/src/main/java/eu/faircode/email/DaoFolder.java b/app/src/main/java/eu/faircode/email/DaoFolder.java index 69851f5f66..b465452b32 100644 --- a/app/src/main/java/eu/faircode/email/DaoFolder.java +++ b/app/src/main/java/eu/faircode/email/DaoFolder.java @@ -127,7 +127,7 @@ public interface DaoFolder { ", hide = :hide" + ", synchronize = :synchronize" + ", unified = :unified" + - ", after = :after" + + ", `after` = :after" + " WHERE id = :id") int setFolderProperties(long id, String name, String display, boolean hide, boolean synchronize, boolean unified, int after); diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 767ba4833d..6292a2fa86 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -34,7 +34,6 @@ import android.graphics.drawable.GradientDrawable; import android.os.Build; import android.os.Bundle; import android.os.Handler; -import android.preference.PreferenceManager; import android.text.Editable; import android.text.Html; import android.text.TextUtils; @@ -339,7 +338,7 @@ public class FragmentAccount extends FragmentEx { btnColor.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - if (PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("pro", false)) { + if (Helper.isPro(getContext())) { int[] colors = getContext().getResources().getIntArray(R.array.colorPicker); ColorPickerDialog colorPickerDialog = new ColorPickerDialog(); colorPickerDialog.initialize(R.string.title_account_color, colors, color, 4, colors.length); diff --git a/app/src/main/java/eu/faircode/email/FragmentMessage.java b/app/src/main/java/eu/faircode/email/FragmentMessage.java index dfabebb940..1d43233f4b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessage.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessage.java @@ -353,7 +353,7 @@ public class FragmentMessage extends FragmentEx { grpHeader.setVisibility(View.GONE); vSeparatorBody.setVisibility(View.GONE); - fab.setVisibility(View.GONE); + fab.hide(); grpThread.setVisibility(View.GONE); grpAddresses.setVisibility(View.GONE); @@ -373,7 +373,7 @@ public class FragmentMessage extends FragmentEx { grpHeader.setVisibility(View.VISIBLE); vSeparatorBody.setVisibility(View.VISIBLE); - fab.setVisibility(View.VISIBLE); + fab.show(); RecyclerView.Adapter adapter = rvAttachment.getAdapter(); @@ -425,7 +425,7 @@ public class FragmentMessage extends FragmentEx { bottom_navigation.setVisibility(View.GONE); grpThread.setVisibility(View.GONE); grpError.setVisibility(View.GONE); - fab.setVisibility(View.GONE); + fab.hide(); pbWait.setVisibility(View.VISIBLE); rvAttachment.setHasFixedSize(false); @@ -1241,7 +1241,10 @@ public class FragmentMessage extends FragmentEx { tvBody.setText(body); btnImages.setVisibility(has_images && !show_images ? View.VISIBLE : View.GONE); grpMessage.setVisibility(View.VISIBLE); - fab.setVisibility(free ? View.GONE : View.VISIBLE); + if (free) + fab.hide(); + else + fab.show(); pbBody.setVisibility(View.GONE); } }; diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 2b0fad285e..f855b44e61 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -380,7 +380,7 @@ public class FragmentMessages extends FragmentEx { tvNoEmail.setVisibility(View.GONE); grpReady.setVisibility(View.GONE); pbWait.setVisibility(View.VISIBLE); - fab.setVisibility(View.GONE); + fab.hide(); return view; } @@ -494,7 +494,7 @@ public class FragmentMessages extends FragmentEx { protected void onLoaded(Bundle args, Long account) { if (account != null) { fab.setTag(account); - fab.setVisibility(View.VISIBLE); + fab.show(); } } diff --git a/app/src/main/res/layout/item_log.xml b/app/src/main/res/layout/item_log.xml index 0c50dae55d..cd75144d78 100644 --- a/app/src/main/res/layout/item_log.xml +++ b/app/src/main/res/layout/item_log.xml @@ -13,7 +13,7 @@ android:text="12:34:56" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="@+id/ivEdit" /> + app:layout_constraintTop_toTopOf="parent" />