mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Refactoring
This commit is contained in:
parent
945bdee8a8
commit
2f41776fb5
1 changed files with 6 additions and 6 deletions
|
@ -1280,8 +1280,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
if (message.from != null)
|
if (message.from != null)
|
||||||
for (Address address : message.from) {
|
for (Address sender : message.from) {
|
||||||
String from = ((InternetAddress) address).getAddress();
|
String from = ((InternetAddress) sender).getAddress();
|
||||||
if (prefs.getBoolean(from + ".show_full", false)) {
|
if (prefs.getBoolean(from + ".show_full", false)) {
|
||||||
properties.setValue("full", message.id, true);
|
properties.setValue("full", message.id, true);
|
||||||
properties.setValue("full_asked", message.id, true);
|
properties.setValue("full_asked", message.id, true);
|
||||||
|
@ -2515,8 +2515,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
if (current || asked) {
|
if (current || asked) {
|
||||||
if (current) {
|
if (current) {
|
||||||
SharedPreferences.Editor editor = prefs.edit();
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
for (Address address : message.from) {
|
for (Address sender : message.from) {
|
||||||
String from = ((InternetAddress) address).getAddress();
|
String from = ((InternetAddress) sender).getAddress();
|
||||||
editor.remove(from + (full ? ".show_full" : ".show_images"));
|
editor.remove(from + (full ? ".show_full" : ".show_images"));
|
||||||
}
|
}
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
@ -2560,8 +2560,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
SharedPreferences.Editor editor = prefs.edit();
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
for (Address address : message.from) {
|
for (Address sender : message.from) {
|
||||||
String from = ((InternetAddress) address).getAddress();
|
String from = ((InternetAddress) sender).getAddress();
|
||||||
editor.putBoolean(from + (full ? ".show_full" : ".show_images"), isChecked);
|
editor.putBoolean(from + (full ? ".show_full" : ".show_images"), isChecked);
|
||||||
}
|
}
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
Loading…
Reference in a new issue