Skip to content

Commit

Permalink
fixes #187 (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-claw authored Apr 21, 2024
1 parent 733f5c9 commit b26f78a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion vripper-core/src/main/kotlin/me/vripper/tasks/AddPostRunnable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit b26f78a

Please sign in to comment.