Fix last circular notified more than one time

This commit is contained in:
2019-12-24 12:52:50 +01:00
committed by Matte23
parent bd6db8e124
commit 541a4ef7c2

View File

@@ -43,10 +43,10 @@ class DataFetcher {
val list = ArrayList<Circular>()
htmlList.forEach { element ->
if (element.text().startsWith("All", true)) {
if (element.parents().size == 6) {
list.last().attachmentsNames.add(element.text())
list.last().attachmentsUrls.add(element.attr("href"))
} else {
} else if (element.parents().size == 4) {
list.add(Circular.generateFromString(element.text(), element.attr("href")))
}
}