Implement new update logic in wrappers
This commit is contained in:
parent
64c536b03c
commit
2cab78dedc
@ -22,9 +22,7 @@ struct InspectorWrapper: ConvenienceWidget {
|
|||||||
data: WidgetData,
|
data: WidgetData,
|
||||||
type: Data.Type
|
type: Data.Type
|
||||||
) -> ViewStorage where Data: ViewRenderData {
|
) -> ViewStorage where Data: ViewRenderData {
|
||||||
let storage = content.storage(data: data, type: type)
|
content.storage(data: data, type: type)
|
||||||
modify(storage, data, true)
|
|
||||||
return storage
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update the stored content.
|
/// Update the stored content.
|
||||||
|
|||||||
@ -24,9 +24,7 @@ struct SafeWrapper: ConvenienceWidget {
|
|||||||
type: Data.Type
|
type: Data.Type
|
||||||
) -> ViewStorage where Data: ViewRenderData {
|
) -> ViewStorage where Data: ViewRenderData {
|
||||||
let contentStorage = content.storage(data: data, type: type)
|
let contentStorage = content.storage(data: data, type: type)
|
||||||
let storage = ViewStorage(contentStorage.pointer, content: [.mainContent: [contentStorage]])
|
return .init(contentStorage.pointer, content: [.mainContent: [contentStorage]])
|
||||||
modify(storage, data, true)
|
|
||||||
return storage
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update the stored content.
|
/// Update the stored content.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user