Browse Source

User's extra info parsing minor fixes

pull/24/head
Apostolos Fanakis 8 years ago
parent
commit
058c25b3ad
  1. 5
      app/src/main/java/gr/thmmy/mthmmy/activities/TopicActivity.java

5
app/src/main/java/gr/thmmy/mthmmy/activities/TopicActivity.java

@ -434,7 +434,7 @@ public class TopicActivity extends BaseActivity {
if (line.contains("Posts:")) { if (line.contains("Posts:")) {
postsLineIndex = infoList.indexOf(line); postsLineIndex = infoList.indexOf(line);
//Remove any line breaks and spaces on the start and end //Remove any line breaks and spaces on the start and end
p_numberOfPosts = p_personalText.replace("\n", "") p_numberOfPosts = line.replace("\n", "")
.replace("\r", "").trim(); .replace("\r", "").trim();
} }
if (line.contains("Gender:")) { if (line.contains("Gender:")) {
@ -469,7 +469,8 @@ public class TopicActivity extends BaseActivity {
//If this line isn't empty and doesn't contain user's avatar //If this line isn't empty and doesn't contain user's avatar
if (!Objects.equals(thisLine, "") && thisLine != null if (!Objects.equals(thisLine, "") && thisLine != null
&& !Objects.equals(thisLine, " \n") && !Objects.equals(thisLine, " \n")
&& !thisLine.contains("avatar")) { && !thisLine.contains("avatar")
&& !thisLine.contains("<a href=")) {
p_personalText = thisLine; //Then this line has user's personal text p_personalText = thisLine; //Then this line has user's personal text
//Remove any line breaks and spaces on the start and end //Remove any line breaks and spaces on the start and end
p_personalText = p_personalText.replace("\n", "") p_personalText = p_personalText.replace("\n", "")

Loading…
Cancel
Save