Puts marked as read on chat to an IO thread

This commit is contained in:
Vitor Pamplona
2023-08-04 21:03:19 -04:00
parent c3b8eb5087
commit 28e6471ade
@@ -254,9 +254,11 @@ fun NormalChatNote(
if (routeForLastRead != null) {
LaunchedEffect(key1 = routeForLastRead) {
val createdAt = note.createdAt()
if (createdAt != null) {
accountViewModel.account.markAsRead(routeForLastRead, createdAt)
launch(Dispatchers.IO) {
val createdAt = note.createdAt()
if (createdAt != null) {
accountViewModel.account.markAsRead(routeForLastRead, createdAt)
}
}
}
}