From 6b76a4c8f4143983d37b5188df3e93307a304e35 Mon Sep 17 00:00:00 2001 From: david-swift Date: Mon, 2 Feb 2026 21:26:50 +0100 Subject: [PATCH] Use new wrap modifier --- Sources/Adwaita/View/AnyView++.swift | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Sources/Adwaita/View/AnyView++.swift b/Sources/Adwaita/View/AnyView++.swift index 3369abe..8be99b7 100644 --- a/Sources/Adwaita/View/AnyView++.swift +++ b/Sources/Adwaita/View/AnyView++.swift @@ -271,13 +271,6 @@ extension AnyView { style("frame", active: active) } - /// Run a function when the view gets an update. - /// - Parameter onUpdate: The function. - /// - Returns: A view. - public func onUpdate(_ onUpdate: @escaping () -> Void) -> AnyView { - inspect { _, _ in onUpdate() } - } - /// Bind to the view's focus. /// - Parameter focus: Whether the view is focused. /// - Returns: A view. @@ -341,7 +334,7 @@ extension AnyView { /// - getString: Get the CSS. /// - Returns: A view. public func css(scheme: ColorScheme? = nil, getString: @escaping () -> String) -> AnyView { - inspect { storage, updateProperties in + wrap { storage, updateProperties in let cssID = "internal-css" let providerID = "internal-css-provider" let previous = storage.fields[cssID] as? String