quote post no when quoting from text selection

and only quote the no if it has not already been quoted
refactor-toolbar
Floens 8 years ago
parent 38ec908614
commit 34d7d021e2
  1. 9
      Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java

@ -306,7 +306,7 @@ public class ReplyPresenter implements AuthenticationLayoutCallback, ImagePickDe
}
public void quote(Post post, CharSequence text) {
handleQuote(null, text.toString());
handleQuote(post, text.toString());
}
private void handleQuote(Post post, String textQuote) {
@ -318,7 +318,12 @@ public class ReplyPresenter implements AuthenticationLayoutCallback, ImagePickDe
extraNewline = "\n";
}
String postQuote = post != null ? ">>" + post.no + "\n" : "";
String postQuote = "";
if (post != null) {
if (!draft.comment.contains(">>" + post.no)) {
postQuote = ">>" + post.no + "\n";
}
}
StringBuilder textQuoteResult = new StringBuilder();
if (textQuote != null) {

Loading…
Cancel
Save