From 4c3fe926c29a7393315b330bb65fca6a84675602 Mon Sep 17 00:00:00 2001 From: Floens Date: Mon, 22 Jan 2018 14:44:49 +0100 Subject: [PATCH] threadstatuscell: hide ips if board does not support them, but keep showing the rest. --- .../org/floens/chan/ui/cell/ThreadStatusCell.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Clover/app/src/main/java/org/floens/chan/ui/cell/ThreadStatusCell.java b/Clover/app/src/main/java/org/floens/chan/ui/cell/ThreadStatusCell.java index d4fbf6f1..596ad3a4 100644 --- a/Clover/app/src/main/java/org/floens/chan/ui/cell/ThreadStatusCell.java +++ b/Clover/app/src/main/java/org/floens/chan/ui/cell/ThreadStatusCell.java @@ -127,9 +127,7 @@ public class ThreadStatusCell extends LinearLayout implements View.OnClickListen if (board != null) { boolean hasReplies = op.getReplies() >= 0; boolean hasImages = op.getImages() >= 0; - boolean hasIps = op.getUniqueIps() >= 0; - - if (hasReplies && hasImages && hasIps) { + if (hasReplies && hasImages) { boolean hasBumpLimit = board.bumpLimit > 0; boolean hasImageLimit = board.imageLimit > 0; @@ -143,10 +141,12 @@ public class ThreadStatusCell extends LinearLayout implements View.OnClickListen images.setSpan(new StyleSpan(Typeface.ITALIC), 0, images.length(), 0); } - String ips = op.getUniqueIps() + "P"; + finalText = TextUtils.concat(statusText, "\n", replies, " / ", images); - finalText = TextUtils.concat(statusText, "\n", - replies, " / ", images, " / ", ips); + if (op.getUniqueIps() >= 0) { + String ips = op.getUniqueIps() + "P"; + finalText = TextUtils.concat(finalText, " / " + ips); + } } }