mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Added option to synchronize subscribed folders only
This commit is contained in:
@@ -46,6 +46,7 @@ import java.text.SimpleDateFormat;
|
||||
public class FragmentOptionsMisc extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private SwitchCompat swBadge;
|
||||
private SwitchCompat swSubscriptions;
|
||||
private SwitchCompat swSubscribedOnly;
|
||||
private SwitchCompat swEnglish;
|
||||
private SwitchCompat swAuthentication;
|
||||
private SwitchCompat swParanoid;
|
||||
@@ -60,7 +61,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
private TextView tvLastCleanup;
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"badge", "subscriptions", "english", "authentication", "paranoid", "cache_lists", "watchdog", "updates", "crash_reports", "debug"
|
||||
"badge", "subscriptions", "subscribed_only", "english", "authentication", "paranoid", "cache_lists", "watchdog", "updates", "crash_reports", "debug"
|
||||
};
|
||||
|
||||
private final static String[] RESET_QUESTIONS = new String[]{
|
||||
@@ -79,6 +80,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
|
||||
swBadge = view.findViewById(R.id.swBadge);
|
||||
swSubscriptions = view.findViewById(R.id.swSubscriptions);
|
||||
swSubscribedOnly = view.findViewById(R.id.swSubscribedOnly);
|
||||
swEnglish = view.findViewById(R.id.swEnglish);
|
||||
swAuthentication = view.findViewById(R.id.swAuthentication);
|
||||
swParanoid = view.findViewById(R.id.swParanoid);
|
||||
@@ -113,6 +115,14 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
}
|
||||
});
|
||||
|
||||
swSubscribedOnly.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("subscribed_only", checked).apply();
|
||||
ServiceSynchronize.reload(getContext(), "subscribed_only");
|
||||
}
|
||||
});
|
||||
|
||||
swEnglish.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -242,6 +252,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
|
||||
swBadge.setChecked(prefs.getBoolean("badge", true));
|
||||
swSubscriptions.setChecked(prefs.getBoolean("subscriptions", false));
|
||||
swSubscribedOnly.setChecked(prefs.getBoolean("subscribed_only", false));
|
||||
swEnglish.setChecked(prefs.getBoolean("english", false));
|
||||
swAuthentication.setChecked(prefs.getBoolean("authentication", false));
|
||||
swParanoid.setChecked(prefs.getBoolean("paranoid", true));
|
||||
|
||||
Reference in New Issue
Block a user