Private
Public Access
1
0

osx: better scroll view management

This commit is contained in:
2025-09-12 15:58:34 -07:00
parent 6261351598
commit bc51bf03a1
4 changed files with 71 additions and 42 deletions

View File

@@ -10,7 +10,7 @@ import SwiftUI
extension TranscriptView.ViewModel
{
internal func rebuildDisplayItems(animated: Bool = false) {
internal func rebuildDisplayItems(animated: Bool = false, completion: () -> Void = {}) {
var displayItems: [DisplayItem] = []
var lastDate: Date = .distantPast
var lastSender: Display.Sender? = nil
@@ -53,6 +53,7 @@ extension TranscriptView.ViewModel
let animation: Animation? = animated ? .default : nil
withAnimation(animation) {
self.displayItems = displayItems
completion()
}
}
}