From ea46d24133fb628ca72f65521a523fec3cec51fe Mon Sep 17 00:00:00 2001 From: Yuichiro Kinoshita Date: Fri, 6 Sep 2024 21:49:27 +0900 Subject: [PATCH] fix: NPE --- .../data/infrastructure/note/impl/sqlite/NoteEntity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/note/impl/sqlite/NoteEntity.kt b/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/note/impl/sqlite/NoteEntity.kt index 28b8f5fdb7..302d0dc70b 100644 --- a/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/note/impl/sqlite/NoteEntity.kt +++ b/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/note/impl/sqlite/NoteEntity.kt @@ -541,8 +541,8 @@ data class NoteWithRelation( null } else { Poll( - expiresAt = note.pollExpiresAt!!, - multiple = note.pollMultiple!!, + expiresAt = note.pollExpiresAt, + multiple = note.pollMultiple ?: false, choices = pollChoices.map { Poll.Choice(it.index, it.text, it.votes, it.isVoted) }.sortedBy { it.index }