From 30ed6cdb7a2fb562eeda33e85b1388369d42ebab Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 21 Sep 2016 22:19:51 +0300 Subject: fix code formatting also in user thread --- juick-www/src/main/java/com/juick/www/PageTemplates.java | 2 +- juick-www/src/main/java/com/juick/www/UserThread.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-www/src/main/java/com') diff --git a/juick-www/src/main/java/com/juick/www/PageTemplates.java b/juick-www/src/main/java/com/juick/www/PageTemplates.java index 11de6bcb..48176ff9 100644 --- a/juick-www/src/main/java/com/juick/www/PageTemplates.java +++ b/juick-www/src/main/java/com/juick/www/PageTemplates.java @@ -313,7 +313,7 @@ public class PageTemplates { } String txt; - if (!msg.Tags.isEmpty() && msg.Tags.stream().filter(t -> t.getName().equals("code")).count() > 0) { + if (msg.Tags.stream().anyMatch(t -> t.getName().equals("code"))) { txt = Utils.formatMessageCode(msg.getText()); } else { txt = Utils.formatMessage(msg.getText()); diff --git a/juick-www/src/main/java/com/juick/www/UserThread.java b/juick-www/src/main/java/com/juick/www/UserThread.java index beb08726..5f9f7e9a 100644 --- a/juick-www/src/main/java/com/juick/www/UserThread.java +++ b/juick-www/src/main/java/com/juick/www/UserThread.java @@ -105,7 +105,7 @@ public class UserThread { } String txt; - if (!msg.Tags.isEmpty() && msg.Tags.contains("code")) { + if (msg.Tags.stream().anyMatch(t -> t.getName().equals("code"))) { txt = Utils.formatMessageCode(msg.getText()); } else { txt = Utils.formatMessage(msg.getText()); -- cgit v1.2.3