1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Refactoring

This commit is contained in:
M66B 2019-11-12 14:15:52 +01:00
parent 945bdee8a8
commit 2f41776fb5

View file

@ -1280,8 +1280,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
if (message.from != null)
for (Address address : message.from) {
String from = ((InternetAddress) address).getAddress();
for (Address sender : message.from) {
String from = ((InternetAddress) sender).getAddress();
if (prefs.getBoolean(from + ".show_full", false)) {
properties.setValue("full", 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) {
SharedPreferences.Editor editor = prefs.edit();
for (Address address : message.from) {
String from = ((InternetAddress) address).getAddress();
for (Address sender : message.from) {
String from = ((InternetAddress) sender).getAddress();
editor.remove(from + (full ? ".show_full" : ".show_images"));
}
editor.apply();
@ -2560,8 +2560,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
SharedPreferences.Editor editor = prefs.edit();
for (Address address : message.from) {
String from = ((InternetAddress) address).getAddress();
for (Address sender : message.from) {
String from = ((InternetAddress) sender).getAddress();
editor.putBoolean(from + (full ? ".show_full" : ".show_images"), isChecked);
}
editor.apply();