mirror of https://github.com/M66B/FairEmail.git
Show search local option on supported Android versions only
This commit is contained in:
parent
4e600c8bad
commit
01fcffe8c9
|
@ -107,6 +107,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||||
private SwitchCompat swUpdates;
|
private SwitchCompat swUpdates;
|
||||||
private SwitchCompat swDebug;
|
private SwitchCompat swDebug;
|
||||||
|
|
||||||
|
private Group grpSearchLocal;
|
||||||
private Group grpNotification;
|
private Group grpNotification;
|
||||||
|
|
||||||
static String[] OPTIONS_RESTART = new String[]{
|
static String[] OPTIONS_RESTART = new String[]{
|
||||||
|
@ -182,6 +183,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||||
swUpdates = view.findViewById(R.id.swUpdates);
|
swUpdates = view.findViewById(R.id.swUpdates);
|
||||||
swDebug = view.findViewById(R.id.swDebug);
|
swDebug = view.findViewById(R.id.swDebug);
|
||||||
|
|
||||||
|
grpSearchLocal = view.findViewById(R.id.grpSearchLocal);
|
||||||
grpNotification = view.findViewById(R.id.grpNotification);
|
grpNotification = view.findViewById(R.id.grpNotification);
|
||||||
|
|
||||||
// Wire controls
|
// Wire controls
|
||||||
|
@ -613,7 +615,8 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||||
swUpdates.setVisibility(Helper.isPlayStoreInstall(getContext()) ? View.GONE : View.VISIBLE);
|
swUpdates.setVisibility(Helper.isPlayStoreInstall(getContext()) ? View.GONE : View.VISIBLE);
|
||||||
swDebug.setChecked(prefs.getBoolean("debug", false));
|
swDebug.setChecked(prefs.getBoolean("debug", false));
|
||||||
|
|
||||||
grpNotification.setVisibility(BuildConfig.DEBUG || Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? View.VISIBLE : View.GONE);
|
grpSearchLocal.setVisibility(Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.M ? View.GONE : View.VISIBLE);
|
||||||
|
grpNotification.setVisibility(Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String formatHour(int minutes) {
|
private String formatHour(int minutes) {
|
||||||
|
|
|
@ -815,6 +815,12 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/swUpdates"
|
app:layout_constraintTop_toBottomOf="@id/swUpdates"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Group
|
||||||
|
android:id="@+id/grpSearchLocal"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:constraint_referenced_ids="swSearchLocal,tvSearchLocalHint" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
<androidx.constraintlayout.widget.Group
|
||||||
android:id="@+id/grpNotification"
|
android:id="@+id/grpNotification"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
Loading…
Reference in New Issue