Puts marked as read on chat to an IO thread
This commit is contained in:
@@ -254,9 +254,11 @@ fun NormalChatNote(
|
|||||||
|
|
||||||
if (routeForLastRead != null) {
|
if (routeForLastRead != null) {
|
||||||
LaunchedEffect(key1 = routeForLastRead) {
|
LaunchedEffect(key1 = routeForLastRead) {
|
||||||
val createdAt = note.createdAt()
|
launch(Dispatchers.IO) {
|
||||||
if (createdAt != null) {
|
val createdAt = note.createdAt()
|
||||||
accountViewModel.account.markAsRead(routeForLastRead, createdAt)
|
if (createdAt != null) {
|
||||||
|
accountViewModel.account.markAsRead(routeForLastRead, createdAt)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user