Browse Source

Fixed subBoard double parsing

pull/61/merge
Ezerous 6 years ago
parent
commit
d65539808c
No known key found for this signature in database GPG Key ID: 262B2954BBA319E3
  1. 7
      app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java

7
app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java

@ -224,8 +224,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
if (newTopicButton == null) if (newTopicButton == null)
newTopicButton = boardPage.select("a:has(img[alt=Νέο θέμα])").first(); newTopicButton = boardPage.select("a:has(img[alt=Νέο θέμα])").first();
if (newTopicButton != null) newTopicUrl = newTopicButton.attr("href"); if (newTopicButton != null) newTopicUrl = newTopicButton.attr("href");
if(pagesLoaded == 0) { //Finds sub boards
{ //Finds sub boards
Elements subBoardRows = boardPage.select("div.tborder>table>tbody>tr"); Elements subBoardRows = boardPage.select("div.tborder>table>tbody>tr");
if (subBoardRows != null && !subBoardRows.isEmpty()) { if (subBoardRows != null && !subBoardRows.isEmpty()) {
for (Element subBoardRow : subBoardRows) { for (Element subBoardRow : subBoardRows) {
@ -269,7 +268,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
} }
} }
} }
{ //Finds topics //Finds topics
Elements topicRows = boardPage.select("table.bordercolor>tbody>tr"); Elements topicRows = boardPage.select("table.bordercolor>tbody>tr");
if (topicRows != null && !topicRows.isEmpty()) { if (topicRows != null && !topicRows.isEmpty()) {
for (Element topicRow : topicRows) { for (Element topicRow : topicRows) {
@ -308,7 +307,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
} }
} }
} }
}
} }
@Override @Override

Loading…
Cancel
Save