Refactoring

This commit is contained in:
M66B 2020-07-25 20:17:25 +02:00
parent 9366320529
commit 9064072e2e
2 changed files with 6 additions and 6 deletions

View File

@ -71,7 +71,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
private SwitchCompat swBadge;
private SwitchCompat swUnseenIgnored;
private SwitchCompat swNotifyBackgroundOnly;
private SwitchCompat swNotifyKnown;
private SwitchCompat swNotifyKnownOnly;
private TextView tvNotifyKnownPro;
private SwitchCompat swNotifySummary;
private SwitchCompat swNotifyRemove;
@ -132,7 +132,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
swBadge = view.findViewById(R.id.swBadge);
swUnseenIgnored = view.findViewById(R.id.swUnseenIgnored);
swNotifyBackgroundOnly = view.findViewById(R.id.swNotifyBackgroundOnly);
swNotifyKnown = view.findViewById(R.id.swNotifyKnown);
swNotifyKnownOnly = view.findViewById(R.id.swNotifyKnownOnly);
tvNotifyKnownPro = view.findViewById(R.id.tvNotifyKnownPro);
swNotifySummary = view.findViewById(R.id.swNotifySummary);
swNotifyRemove = view.findViewById(R.id.swNotifyRemove);
@ -318,7 +318,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
}
});
swNotifyKnown.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
swNotifyKnownOnly.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("notify_known", checked).apply();
@ -468,7 +468,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
swBadge.setChecked(prefs.getBoolean("badge", true));
swUnseenIgnored.setChecked(prefs.getBoolean("unseen_ignored", false));
swNotifyBackgroundOnly.setChecked(prefs.getBoolean("notify_background_only", false));
swNotifyKnown.setChecked(prefs.getBoolean("notify_known", false));
swNotifyKnownOnly.setChecked(prefs.getBoolean("notify_known", false));
swNotifySummary.setChecked(prefs.getBoolean("notify_summary", false));
swNotifyRemove.setChecked(prefs.getBoolean("notify_remove", true));
swNotifyClear.setChecked(prefs.getBoolean("notify_clear", false));

View File

@ -340,7 +340,7 @@
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swNotifyKnown"
android:id="@+id/swNotifyKnownOnly"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
@ -360,7 +360,7 @@
android:textColor="?android:attr/textColorLink"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swNotifyKnown" />
app:layout_constraintTop_toBottomOf="@id/swNotifyKnownOnly" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swNotifySummary"