Skip to content

Commit

Permalink
WIP annoying null pointer
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
  • Loading branch information
rapterjet2004 committed Aug 12, 2024
1 parent 0635bb9 commit 9e33c9f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,11 @@ class OfflineFirstChatRepository @Inject constructor(
// the parent message is always the newest state, no matter how old the system message is.
// that's why we can just take the parent, update it in DB and update the UI
messageJson.parentMessage?.let { parentMessageJson ->
val parentMessageEntity = parentMessageJson.asEntity(currentUser.id!!)
chatDao.upsertChatMessage(parentMessageEntity)
_updateMessageFlow.emit(parentMessageEntity.asModel())
parentMessageJson.message?.let {
val parentMessageEntity = parentMessageJson.asEntity(currentUser.id!!)
chatDao.upsertChatMessage(parentMessageEntity)
_updateMessageFlow.emit(parentMessageEntity.asModel())
}
}
}

Expand Down

0 comments on commit 9e33c9f

Please sign in to comment.