Skip to content

Commit

Permalink
shorten subject to max of 90 chars. close #1769
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Dec 10, 2023
1 parent 75f7500 commit 8e01f22
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ public static void setMessageImpl(Message msg, JLabel lblSubject, JLabel lblSent
lblSentDate.setText(df2.format(msg.getReceptionTime()));
}
String shortened=msg.getSubject();
shortened=shortened.substring(0,Math.min(150, shortened.length()));
shortened=shortened.substring(0,Math.min(90, shortened.length()));
lblSubject.setText(shortened);
lblSubject.setToolTipText(msg.getSubject());
lblFrom.setText(msg.getSenderName());
Expand All @@ -879,7 +879,7 @@ public static void setMessageImpl(Message msg, JLabel lblSubject, JLabel lblSent
}

String to = "";
if (msg.getRecipients().size() > 0) {
if (!msg.getRecipients().isEmpty()) {
to = msg.getRecipients().get(0).getName();
for (int i = 1; i < msg.getRecipients().size(); i++) {
to = to + ", " + msg.getRecipients().get(i).getName();
Expand Down Expand Up @@ -920,7 +920,7 @@ public static void setMessageImpl(Message msg, JLabel lblSubject, JLabel lblSent
processCardTable.setModel(tm2);
tabs.setIconAt(2, null);
if (msg.getProcessCard() != null) {
if (msg.getProcessCard().getEntries().size() > 0 || !StringUtils.isEmpty(msg.getProcessCard().getExceptionMessage())) {
if (!msg.getProcessCard().getEntries().isEmpty() || !StringUtils.isEmpty(msg.getProcessCard().getExceptionMessage())) {
tabs.setIconAt(2, new javax.swing.ImageIcon(BeaMessageContentUI.class.getResource("/icons/messagebox_warning.png")));
}
if(!StringUtils.isEmpty(msg.getProcessCard().getExceptionMessage())) {
Expand Down

0 comments on commit 8e01f22

Please sign in to comment.