Cloud sync: removed account sync concept

This commit is contained in:
M66B
2023-01-17 23:05:56 +01:00
parent 2a9c81417d
commit f7d0f99342
8 changed files with 6 additions and 3614 deletions

View File

@@ -118,10 +118,7 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
private TextInputLayout tilPassword;
private Button btnLogin;
private TextView tvLogin;
private CheckBox cbAccounts;
private CheckBox cbAccountsDelete;
private CheckBox cbBlockedSenders;
private CheckBox cbFilterRules;
private ImageButton ibSync;
private TextView tvLastSync;
private Button btnLogout;
@@ -162,10 +159,7 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
tilPassword = view.findViewById(R.id.tilPassword);
btnLogin = view.findViewById(R.id.btnLogin);
tvLogin = view.findViewById(R.id.tvLogin);
cbAccounts = view.findViewById(R.id.cbAccounts);
cbAccountsDelete = view.findViewById(R.id.cbAccountsDelete);
cbBlockedSenders = view.findViewById(R.id.cbBlockedSenders);
cbFilterRules = view.findViewById(R.id.cbFilterRules);
ibSync = view.findViewById(R.id.ibSync);
tvLastSync = view.findViewById(R.id.tvLastSync);
btnLogout = view.findViewById(R.id.btnLogout);
@@ -212,21 +206,6 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
}
});
cbAccounts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
prefs.edit().putBoolean("cloud_sync_accounts", isChecked).apply();
cbAccountsDelete.setEnabled(isChecked);
}
});
cbAccountsDelete.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
prefs.edit().putBoolean("cloud_sync_accounts_delete", isChecked).apply();
}
});
cbBlockedSenders.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
@@ -234,13 +213,6 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
}
});
cbFilterRules.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
prefs.edit().putBoolean("cloud_sync_filter_rules", isChecked).apply();
}
});
ibSync.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -266,11 +238,7 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
Helper.linkPro(tvCloudPro);
prefs.registerOnSharedPreferenceChangeListener(this);
cbAccounts.setChecked(prefs.getBoolean("cloud_sync_accounts", true));
cbAccountsDelete.setChecked(prefs.getBoolean("cloud_sync_accounts_delete", false));
cbAccountsDelete.setEnabled(cbAccounts.isChecked());
cbBlockedSenders.setChecked(prefs.getBoolean("cloud_sync_blocked_senders", true));
cbFilterRules.setChecked(prefs.getBoolean("cloud_sync_filter_rules", true));
onSharedPreferenceChanged(prefs, null);
return view;