Layout optimization

This commit is contained in:
M66B 2020-07-18 17:47:12 +02:00
parent 9c8a7977e9
commit d74a7c17d4
1 changed files with 5 additions and 2 deletions

View File

@ -1203,8 +1203,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private void clearExpanded(TupleMessageEx message) {
if (compact) {
tvFrom.setSingleLine(true);
tvSubject.setSingleLine(!"full".equals(subject_ellipsize));
if (tvFrom.getMaxLines() > 1)
tvFrom.setSingleLine(true);
boolean full = "full".equals(subject_ellipsize);
if (full ? tvSubject.getMaxLines() == 1 : tvSubject.getMaxLines() > 1)
tvSubject.setSingleLine(!full);
}
tvPreview.setVisibility(