mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-25 20:44:38 +00:00
fix mark read for ranges
This commit is contained in:
+8
-1
@@ -1346,7 +1346,14 @@ fun BoxWithConstraintsScope.ChatItemsList(
|
||||
LaunchedEffect(cItem.id) {
|
||||
scope.launch {
|
||||
delay(600)
|
||||
markRead(CC.ItemRange(cItem.id, cItem.id), null)
|
||||
val range = if (sectionItems.mergeCategory != null) {
|
||||
val firstItem = sectionItems.items.first()
|
||||
val lastItem = sectionItems.items.last()
|
||||
CC.ItemRange(lastItem.id, firstItem.id)
|
||||
} else {
|
||||
CC.ItemRange(cItem.id, cItem.id)
|
||||
}
|
||||
markRead(range, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user