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