Added option to collapse messages in conversations on back

This commit is contained in:
M66B
2018-12-19 09:09:50 +01:00
parent e5f8c54ba8
commit 9897b63204
4 changed files with 30 additions and 6 deletions

View File

@@ -74,6 +74,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
private SwitchCompat swSwipe;
private SwitchCompat swActionbar;
private SwitchCompat swAutoclose;
private SwitchCompat swCollapse;
private SwitchCompat swConfirm;
private SwitchCompat swSender;
@@ -111,6 +112,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
swSwipe = view.findViewById(R.id.swSwipe);
swActionbar = view.findViewById(R.id.swActionbar);
swAutoclose = view.findViewById(R.id.swAutoclose);
swCollapse = view.findViewById(R.id.swCollapse);
swConfirm = view.findViewById(R.id.swConfirm);
swSender = view.findViewById(R.id.swSender);
@@ -303,6 +305,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
}
});
swCollapse.setChecked(prefs.getBoolean("collapse", false));
swCollapse.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("collapse", checked).apply();
}
});
swConfirm.setChecked(prefs.getBoolean("confirm", false));
swConfirm.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override