Skip to content

Commit cf1a1f4

Browse files
committed
DisplayList.Value.init(decodedValue:) updates lastValue
1 parent 0e239ac commit cf1a1f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/OpenSwiftUICore/Render/DisplayList/DisplayList.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,14 @@ extension DisplayList {
217217
package private(set) var value: Int
218218

219219
package init() { value = .zero }
220-
package init(decodedValue value: Int) { self.value = value }
221220

222221
private static var lastValue: Int = .zero
223222

223+
package init(decodedValue value: Int) {
224+
Version.lastValue = max(Version.lastValue, value)
225+
self.value = value
226+
}
227+
224228
package init(forUpdate: Void) {
225229
Version.lastValue &+= 1
226230
value = Version.lastValue

0 commit comments

Comments
 (0)