This commit is contained in:
death-claw
2024-04-21 10:24:36 +01:00
parent 733f5c926e
commit c99eb78c83
@@ -76,7 +76,17 @@ class AddPostRunnable(private val items: List<ThreadPostId>) : KoinComponent, Ru
}
}
val postItem = threadItem.postItemList.first()
val postItem = threadItem.postItemList.firstOrNull { it.postId == postId }
if (postItem == null) {
dataTransaction.saveLog(
LogEntryEntity(
type = LogEntryEntity.Type.POST,
status = LogEntryEntity.Status.ERROR,
message = "Unable to load $link"
)
)
continue
}
toProcess.add(postItem)
}