Do not show empty tags in navigator

This commit is contained in:
Alejandro 2019-05-28 19:53:39 +03:00
parent 6d23533abd
commit 79f7a8e434

View File

@ -956,8 +956,10 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
message.appendInt(this.score);
message.appendInt(0);
message.appendInt(this.category);
message.appendInt(this.tags.split(";").length);
for (String s : this.tags.split(";")) {
String[] tags = Arrays.stream(this.tags.split(";")).filter(t -> !t.isEmpty()).toArray(String[]::new);
message.appendInt(tags.length);
for (String s : tags) {
message.appendString(s);
}