osx: better scroll view management
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user