Allow turning of browsing messages

Refs #138
This commit is contained in:
M66B
2018-09-22 08:19:00 +00:00
parent 6e351234eb
commit b123f54fd2
5 changed files with 26 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ import androidx.annotation.Nullable;
public class FragmentOptions extends FragmentEx {
private CheckBox cbAvatars;
private CheckBox cbLight;
private CheckBox cbBrowse;
private CheckBox cbDebug;
@Override
@@ -46,6 +47,7 @@ public class FragmentOptions extends FragmentEx {
// Get controls
cbAvatars = view.findViewById(R.id.cbAvatars);
cbLight = view.findViewById(R.id.cbLight);
cbBrowse = view.findViewById(R.id.cbBrowse);
cbDebug = view.findViewById(R.id.cbDebug);
// Wire controls
@@ -68,6 +70,14 @@ public class FragmentOptions extends FragmentEx {
}
});
cbBrowse.setChecked(prefs.getBoolean("browse", true));
cbBrowse.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("browse", checked).apply();
}
});
cbDebug.setChecked(prefs.getBoolean("debug", false));
cbDebug.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override