mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 10:47:28 +00:00
Prevent crash
This commit is contained in:
parent
5ac315f3d3
commit
fc1d1f8c3f
1 changed files with 3 additions and 1 deletions
|
@ -8296,7 +8296,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
@NonNull
|
@NonNull
|
||||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
View view = inflater.inflate(viewType, parent, false);
|
View view = inflater.inflate(viewType, parent, false);
|
||||||
if (align_header) {
|
if (align_header &&
|
||||||
|
(viewType == R.layout.item_message_compact ||
|
||||||
|
viewType == R.layout.item_message_normal)) {
|
||||||
View v = view.findViewById(R.id.ibAvatar);
|
View v = view.findViewById(R.id.ibAvatar);
|
||||||
ConstraintLayout.LayoutParams lparam = (ConstraintLayout.LayoutParams) v.getLayoutParams();
|
ConstraintLayout.LayoutParams lparam = (ConstraintLayout.LayoutParams) v.getLayoutParams();
|
||||||
lparam.bottomToBottom = R.id.tvNotes; // tvFolder
|
lparam.bottomToBottom = R.id.tvNotes; // tvFolder
|
||||||
|
|
Loading…
Reference in a new issue