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]
|
storage.content[Self.dialogID + id] = [dialog]
|
||||||
if let extraChild {
|
if let extraChild {
|
||||||
let child = extraChild.storage(data: data, type: AdwaitaMainView.self)
|
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
|
let childPointer = child.pointer as? OpaquePointer
|
||||||
storage.content["extra-child"] = [child]
|
storage.content["extra-child"] = [child]
|
||||||
adw_alert_dialog_set_extra_child(pointer?.cast(), childPointer?.cast())
|
adw_alert_dialog_set_extra_child(pointer?.cast(), childPointer?.cast())
|
||||||
|
|||||||
@ -130,6 +130,7 @@ struct Dialog: AdwaitaWidget {
|
|||||||
let dialog = ViewStorage(pointer?.opaque())
|
let dialog = ViewStorage(pointer?.opaque())
|
||||||
storage.content[dialogID + id] = [dialog]
|
storage.content[dialogID + id] = [dialog]
|
||||||
let contentStorage = content.storage(data: data, type: type)
|
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())
|
adw_dialog_set_child(pointer, contentStorage.opaquePointer?.cast())
|
||||||
storage.content[contentID + id] = [contentStorage]
|
storage.content[contentID + id] = [contentStorage]
|
||||||
dialog.connectSignal(name: "closed") {
|
dialog.connectSignal(name: "closed") {
|
||||||
|
|||||||
@ -111,6 +111,8 @@ extension NavigationView {
|
|||||||
} else { print("Warning: removing the initial view is not allowed.") }
|
} else { print("Warning: removing the initial view is not allowed.") }
|
||||||
case let .push(component):
|
case let .push(component):
|
||||||
let contentStorage = views.0(component).storage(data: data, type: AdwaitaMainView.self)
|
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
|
contentStorage.fields[Self.componentID] = component
|
||||||
storages.append(contentStorage)
|
storages.append(contentStorage)
|
||||||
adw_navigation_view_push(
|
adw_navigation_view_push(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user