mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Refactoring
This commit is contained in:
parent
c87cf45e23
commit
6693060e54
2 changed files with 6 additions and 6 deletions
|
@ -57,7 +57,7 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
|
|||
private List<TupleAccountEx> items = new ArrayList<>();
|
||||
|
||||
private NumberFormat NF = NumberFormat.getNumberInstance();
|
||||
private DateFormat DTF;
|
||||
private DateFormat TF;
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
||||
private View view;
|
||||
|
@ -112,7 +112,7 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
|
|||
tvItem.setTextColor(account.unseen == 0 ? textColorSecondary : colorUnread);
|
||||
tvItem.setTypeface(account.unseen == 0 ? Typeface.DEFAULT : Typeface.DEFAULT_BOLD);
|
||||
|
||||
tvItemExtra.setText(account.last_connected == null ? null : DTF.format(account.last_connected));
|
||||
tvItemExtra.setText(account.last_connected == null ? null : TF.format(account.last_connected));
|
||||
|
||||
ivExternal.setVisibility(View.GONE);
|
||||
ivWarning.setVisibility(account.error == null ? View.GONE : View.VISIBLE);
|
||||
|
@ -190,7 +190,7 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
|
|||
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
this.DTF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
||||
this.TF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
||||
|
||||
setHasStableIds(true);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
|||
private List<TupleFolderNav> items = new ArrayList<>();
|
||||
|
||||
private NumberFormat NF = NumberFormat.getNumberInstance();
|
||||
private DateFormat DTF;
|
||||
private DateFormat TF;
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||
private View view;
|
||||
|
@ -127,7 +127,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
|||
tvItem.setTextColor(count == 0 ? textColorSecondary : colorUnread);
|
||||
tvItem.setTypeface(count == 0 ? Typeface.DEFAULT : Typeface.DEFAULT_BOLD);
|
||||
|
||||
tvItemExtra.setText(folder.last_sync == null ? null : DTF.format(folder.last_sync));
|
||||
tvItemExtra.setText(folder.last_sync == null ? null : TF.format(folder.last_sync));
|
||||
tvItemExtra.setVisibility(debug ? View.VISIBLE : View.GONE);
|
||||
|
||||
ivExternal.setVisibility(View.GONE);
|
||||
|
@ -165,7 +165,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
|||
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
|
||||
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
|
||||
|
||||
this.DTF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
||||
this.TF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
||||
|
||||
setHasStableIds(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue