lash mark read

This commit is contained in:
Diogo
2024-11-07 23:09:45 +00:00
parent de1c0f2bf8
commit a8e2fd3c97
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -1080,7 +1080,7 @@ struct ChatView: View {
Task {
_ = try? await Task.sleep(nanoseconds: 600_000000)
let currIndex = m.getChatItemIndex(chatItem)
if let currIndex = currIndex, currIndex >= ChatView.FloatingButtonModel.shared.bottomItemIndex {
if let currIndex = currIndex, currIndex >= ChatView.FloatingButtonModel.shared.bottomItemIndex - 3 {
if m.chatId == chat.chatInfo.id {
await op()
}
@@ -40,7 +40,6 @@ struct ReverseList<Content: View>: UIViewControllerRepresentable {
controller.scroll(to: 0, position: .top)
}
} else {
logger.error("[scrolling] not scrolling gap: (\(gap?.index ?? -1), \(gap?.size ?? 0))")
controller.update(items: items, gap: gap)
}
}
@@ -204,10 +203,8 @@ struct ReverseList<Content: View>: UIViewControllerRepresentable {
if #available(iOS 16.0, *) {
animated = true
}
logger.error("[scrolling] requesting scroll")
if let index, tableView.numberOfRows(inSection: 0) != 0 {
logger.error("[scrolling] requesting scroll to index: \(index) position: \(position.rawValue)")
tableView.scrollToRow(
at: IndexPath(row: index, section: 0),
at: position,