From 94276638065ec051a9c9e60896ff80a91af67d2d Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sat, 1 Sep 2018 12:08:07 +0300 Subject: [PATCH] Board parsing minor fix --- .../java/gr/thmmy/mthmmy/activities/board/BoardActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java index d5d8f593..75d0bea8 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java @@ -286,9 +286,11 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo if (pLastPost.contains("by")) { pLastPost = pLastPost.substring(0, pLastPost.indexOf("by")) + "\n" + pLastPost.substring(pLastPost.indexOf("by")); - } else { + } else if (pLastPost.contains("από")) { pLastPost = pLastPost.substring(0, pLastPost.indexOf("από")) + "\n" + pLastPost.substring(pLastPost.indexOf("από")); + } else { + Timber.wtf("Board parsing about to fail. pLastPost came with: %s", pLastPost); } pLastPostUrl = topicColumns.last().select("a:has(img)").first().attr("href"); parsedTopics.add(new Topic(pTopicUrl, pSubject, pStartedBy, pLastPost, pLastPostUrl,