Use new update logic to construct dialog UIs
This commit is contained in:
parent
d0d7d2b6d3
commit
0fc91dc50e
@ -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())
|
||||
|
||||
@ -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") {
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user