diff --git a/Clover/app/src/main/java/org/floens/chan/core/model/Post.java b/Clover/app/src/main/java/org/floens/chan/core/model/Post.java index 2cf1e039..79809865 100644 --- a/Clover/app/src/main/java/org/floens/chan/core/model/Post.java +++ b/Clover/app/src/main/java/org/floens/chan/core/model/Post.java @@ -215,13 +215,8 @@ public class Post { } else if (nodeName.equals("a")) { Element anchor = (Element) node; - SpannableString link = new SpannableString(anchor.text()); - + // is this a link or a quote Type t = anchor.text().contains("://") ? Type.LINK : Type.QUOTE; - PostLinkable pl = new PostLinkable(this, anchor.text(), anchor.attr("href"), t); - link.setSpan(pl, 0, link.length(), 0); - linkables.add(pl); - if (t == Type.QUOTE) { try { // Get post id @@ -229,11 +224,22 @@ public class Post { if (splitted.length == 2) { int id = Integer.parseInt(splitted[1]); repliesTo.add(id); + + // Append OP when its a reply to OP + if(id == resto) { + anchor.appendText(" (OP)"); + } } } catch (NumberFormatException e) { } } + SpannableString link = new SpannableString(anchor.text()); + + PostLinkable pl = new PostLinkable(this, anchor.text(), anchor.attr("href"), t); + link.setSpan(pl, 0, link.length(), 0); + linkables.add(pl); + total = TextUtils.concat(total, link); } else if (nodeName.equals("s")) { Element spoiler = (Element) node;