mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
ea399c2ba0
commit
6a7f04ea5f
|
@ -3745,18 +3745,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
Log.i("Answer count=" + answers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
TupleMessageEx message = differ.getItem(position);
|
||||
if (message == null || context == null)
|
||||
return R.layout.item_message_placeholder;
|
||||
|
||||
if (filter_duplicates && message.duplicate)
|
||||
return R.layout.item_message_duplicate;
|
||||
|
||||
return (compact ? R.layout.item_message_compact : R.layout.item_message_normal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return differ.getItemCount();
|
||||
|
@ -4036,6 +4024,19 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
TupleMessageEx message = differ.getItem(position);
|
||||
|
||||
if (message == null || context == null)
|
||||
return R.layout.item_message_placeholder;
|
||||
|
||||
if (filter_duplicates && message.duplicate)
|
||||
return R.layout.item_message_duplicate;
|
||||
|
||||
return (compact ? R.layout.item_message_compact : R.layout.item_message_normal);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
@ -4045,6 +4046,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
TupleMessageEx message = differ.getItem(position);
|
||||
|
||||
if (message == null || context == null)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue