Use new update logic to construct dialog UIs
Some checks are pending
Deploy Docs / publish (push) Waiting to run
SwiftLint / SwiftLint (push) Waiting to run

This commit is contained in:
david-swift 2026-02-03 00:15:37 +01:00
parent d0d7d2b6d3
commit 0fc91dc50e
3 changed files with 4 additions and 0 deletions

View File

@ -215,6 +215,7 @@ public struct AlertDialog: AdwaitaWidget {
storage.content[Self.dialogID + id] = [dialog]
if let extraChild {
let child = extraChild.storage(data: data, type: AdwaitaMainView.self)
extraChild.updateStorage(child, data: data, updateProperties: true, type: AdwaitaMainView.self)
let childPointer = child.pointer as? OpaquePointer
storage.content["extra-child"] = [child]
adw_alert_dialog_set_extra_child(pointer?.cast(), childPointer?.cast())

View File

@ -130,6 +130,7 @@ struct Dialog: AdwaitaWidget {
let dialog = ViewStorage(pointer?.opaque())
storage.content[dialogID + id] = [dialog]
let contentStorage = content.storage(data: data, type: type)
content.updateStorage(contentStorage, data: data, updateProperties: true, type: type)
adw_dialog_set_child(pointer, contentStorage.opaquePointer?.cast())
storage.content[contentID + id] = [contentStorage]
dialog.connectSignal(name: "closed") {

View File

@ -111,6 +111,8 @@ extension NavigationView {
} else { print("Warning: removing the initial view is not allowed.") }
case let .push(component):
let contentStorage = views.0(component).storage(data: data, type: AdwaitaMainView.self)
views.0(component)
.updateStorage(contentStorage, data: data, updateProperties: true, type: AdwaitaMainView.self)
contentStorage.fields[Self.componentID] = component
storages.append(contentStorage)
adw_navigation_view_push(