mirror of https://github.com/M66B/FairEmail.git
Save last FTS use
This commit is contained in:
parent
49570e7e02
commit
a395ad55b8
|
@ -71,6 +71,7 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
||||||
|
|
||||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean fts = prefs.getBoolean("fts", false);
|
boolean fts = prefs.getBoolean("fts", false);
|
||||||
|
boolean last_fts = prefs.getBoolean("last_fts", true);
|
||||||
boolean last_search_senders = prefs.getBoolean("last_search_senders", true);
|
boolean last_search_senders = prefs.getBoolean("last_search_senders", true);
|
||||||
boolean last_search_recipients = prefs.getBoolean("last_search_recipients", true);
|
boolean last_search_recipients = prefs.getBoolean("last_search_recipients", true);
|
||||||
boolean last_search_subject = prefs.getBoolean("last_search_subject", true);
|
boolean last_search_subject = prefs.getBoolean("last_search_subject", true);
|
||||||
|
@ -250,6 +251,7 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
||||||
cbSearchIndex.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
cbSearchIndex.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
|
prefs.edit().putBoolean("last_fts", isChecked).apply();
|
||||||
cbSenders.setAlpha(isChecked ? Helper.LOW_LIGHT : 1.0f);
|
cbSenders.setAlpha(isChecked ? Helper.LOW_LIGHT : 1.0f);
|
||||||
cbRecipients.setAlpha(isChecked ? Helper.LOW_LIGHT : 1.0f);
|
cbRecipients.setAlpha(isChecked ? Helper.LOW_LIGHT : 1.0f);
|
||||||
cbSubject.setAlpha(isChecked ? Helper.LOW_LIGHT : 1.0f);
|
cbSubject.setAlpha(isChecked ? Helper.LOW_LIGHT : 1.0f);
|
||||||
|
@ -355,8 +357,8 @@ public class FragmentDialogSearch extends FragmentDialogBase {
|
||||||
});
|
});
|
||||||
|
|
||||||
ibMore.setImageLevel(1);
|
ibMore.setImageLevel(1);
|
||||||
cbSearchIndex.setChecked(fts && pro);
|
cbSearchIndex.setChecked(last_fts && fts && pro);
|
||||||
cbSearchIndex.setEnabled(pro);
|
cbSearchIndex.setEnabled(fts && pro);
|
||||||
cbSenders.setChecked(last_search_senders);
|
cbSenders.setChecked(last_search_senders);
|
||||||
cbRecipients.setChecked(last_search_recipients);
|
cbRecipients.setChecked(last_search_recipients);
|
||||||
cbSubject.setChecked(last_search_subject);
|
cbSubject.setChecked(last_search_subject);
|
||||||
|
|
Loading…
Reference in New Issue