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,12 +254,14 @@ fun NormalChatNote(
if (routeForLastRead != null) {
LaunchedEffect(key1 = routeForLastRead) {
launch(Dispatchers.IO) {
val createdAt = note.createdAt()
if (createdAt != null) {
accountViewModel.account.markAsRead(routeForLastRead, createdAt)
}
}
}
}
Column() {
val modif = remember {