feat(ios): update dependencies to track upstream repository (#11143)

This commit is contained in:
Lakr
2025-03-28 14:12:06 +08:00
committed by GitHub
parent af91a0217f
commit 08ee84e697
108 changed files with 96 additions and 37793 deletions

View File

@@ -10,11 +10,20 @@ import UIKit
extension UIView {
func diffableUpdate(reusingViews blockViews: inout [BlockView], manifests: [AnyBlockManifest]) {
defer {
assert(blockViews.count == manifests.count, "blockViews count must match manifests count")
}
var shouldRemovedIndices: [Int] = []
defer {
shouldRemovedIndices.sorted(by: >).forEach { index in
blockViews.remove(at: index)
}
}
for idx in 0 ..< max(blockViews.count, manifests.count) {
guard let manifest = manifests[safe: idx] else {
if let view = blockViews[safe: idx] {
view.removeFromSuperview()
blockViews.remove(at: idx)
shouldRemovedIndices.append(idx)
}
continue
}

View File

@@ -39,6 +39,7 @@ public class MarkdownView: UIView {
)
anchorY = view.frame.maxY + theme.spacings.final
}
height = blockViews.map(\.frame.maxY).max() ?? 0
assert(subviews.count == blockViews.count)
}
}