mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
lash mark read
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user