Skip to content

Commit adecb31

Browse files
committed
Fix preview processing with two triggers
1 parent ef0ae33 commit adecb31

File tree

1 file changed

+2
-2
lines changed
  • common/src/main/java/dev/terminalmc/chatnotify/gui/widget/list

1 file changed

+2
-2
lines changed

common/src/main/java/dev/terminalmc/chatnotify/gui/widget/list/FilterList.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,8 @@ private static MutableComponent createLabel(Notification notif, int maxWidth) {
902902
// Trim label by deleting triggers from the end until it's
903903
// small enough. Not the most efficient, but we're capped.
904904
while(font.width(compileLabel(strList)) > maxWidth
905-
&& (strList.size() > 2
906-
|| (strList.size() == 2
905+
&& (strList.size() != 1
906+
&& !(strList.size() == 2
907907
&& plusNumPattern.matcher(strList.getLast()).matches()))
908908
) {
909909
// Remove the number (if any) and the last trigger

0 commit comments

Comments
 (0)