threadstatuscell: hide ips if board does not support them, but keep

showing the rest.
refactor-toolbar
Floens 8 years ago
parent aa7fa04ec6
commit 4c3fe926c2
  1. 12
      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) { if (board != null) {
boolean hasReplies = op.getReplies() >= 0; boolean hasReplies = op.getReplies() >= 0;
boolean hasImages = op.getImages() >= 0; boolean hasImages = op.getImages() >= 0;
boolean hasIps = op.getUniqueIps() >= 0; if (hasReplies && hasImages) {
if (hasReplies && hasImages && hasIps) {
boolean hasBumpLimit = board.bumpLimit > 0; boolean hasBumpLimit = board.bumpLimit > 0;
boolean hasImageLimit = board.imageLimit > 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); 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", if (op.getUniqueIps() >= 0) {
replies, " / ", images, " / ", ips); String ips = op.getUniqueIps() + "P";
finalText = TextUtils.concat(finalText, " / " + ips);
}
} }
} }

Loading…
Cancel
Save