Revert "refactor: make PostComments non-nullable"

This reverts commit 39e3d783cd.
This commit is contained in:
Harsh Shandilya 2024-09-16 12:30:37 +05:30
parent a0276c4873
commit 1dfea689c6
4 changed files with 8 additions and 13 deletions

View file

@ -22,10 +22,7 @@ constructor(
) {
suspend fun getSeenComments(postId: String) =
withContext(dbDispatcher) {
postCommentsQueries.getCommentIds(postId).executeAsOneOrNull()
?: PostComments(postId = postId, commentIds = emptyList())
}
withContext(dbDispatcher) { postCommentsQueries.getCommentIds(postId).executeAsOneOrNull() }
suspend fun markSeenComments(postId: String, comments: List<Comment>) {
withContext(dbDispatcher) {