mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 11:15:51 +00:00
Made account notifications pro
This commit is contained in:
parent
497ec0a7a9
commit
c1386a42be
1 changed files with 19 additions and 0 deletions
|
@ -391,6 +391,20 @@ public class FragmentAccount extends FragmentEx {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cbNotify.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
|
if (isChecked && !Helper.isPro(getContext())) {
|
||||||
|
cbNotify.setChecked(false);
|
||||||
|
|
||||||
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
||||||
|
fragmentTransaction.hide(FragmentAccount.this);
|
||||||
|
fragmentTransaction.add(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
||||||
|
fragmentTransaction.commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
cbSynchronize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
cbSynchronize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
@ -726,6 +740,11 @@ public class FragmentAccount extends FragmentEx {
|
||||||
if (account.primary)
|
if (account.primary)
|
||||||
db.account().resetPrimary();
|
db.account().resetPrimary();
|
||||||
|
|
||||||
|
if (!Helper.isPro(context)) {
|
||||||
|
account.color = null;
|
||||||
|
account.notify = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (update)
|
if (update)
|
||||||
db.account().updateAccount(account);
|
db.account().updateAccount(account);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue