From 23ff0e1e40bcb7324d7470ee3a147854ab1db9ae Mon Sep 17 00:00:00 2001 From: Florens Douwes Date: Sun, 4 May 2014 13:49:23 +0200 Subject: [PATCH] (image) when only a image is posted in WatchNotifier --- .../src/org/floens/chan/core/watch/WatchNotifier.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Chan/src/org/floens/chan/core/watch/WatchNotifier.java b/Chan/src/org/floens/chan/core/watch/WatchNotifier.java index c9127ec7..6da805c0 100644 --- a/Chan/src/org/floens/chan/core/watch/WatchNotifier.java +++ b/Chan/src/org/floens/chan/core/watch/WatchNotifier.java @@ -128,10 +128,17 @@ public class WatchNotifier { List lines = new ArrayList(); for (Post post : posts) { + CharSequence comment; + if (post.comment.length() == 0) { + comment = "(image)"; + } else { + comment = post.comment; + } + if (pins.size() > 1) { - lines.add(post.title + ": " + post.comment); + lines.add(post.title + ": " + comment); } else { - lines.add(post.comment); + lines.add(comment); } }