Skip to content

Commit

Permalink
Subtitle tag fix
Browse files Browse the repository at this point in the history
  • Loading branch information
witx98 committed Nov 27, 2024
1 parent ebce197 commit 72aa085
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -64,7 +65,12 @@ private List<Tag> tagsForConnection(HofundConnection connection) {
List<Tag> tags = new LinkedList<>();
tags.add(Tag.of("id", connection.toTargetTag()));
tags.add(Tag.of("title", connection.getTarget() + "_" + connection.getType()));
tags.add(Tag.of("subtitle", connection.getType().toString() + " (" + connection.getDescription() + ")"));

String subtitle = Objects.equals(connection.getDescription(), "") ?
connection.getTarget()
: String.format("%s (%s)", connection.getType(), connection.getDescription());

tags.add(Tag.of("subtitle", subtitle));
tags.add(Tag.of("type", connection.getType().toString()));
return tags;
}
Expand Down

0 comments on commit 72aa085

Please sign in to comment.