| 13 | namespace Valdi { |
| 14 | |
| 15 | Result<Void> ViewAttributeHandlerDelegate::onApply(ViewTransactionScope& viewTransactionScope, |
| 16 | ViewNode& viewNode, |
| 17 | const Ref<View>& view, |
| 18 | const StringBox& name, |
| 19 | const Value& value, |
| 20 | const Ref<Animator>& animator) { |
| 21 | viewTransactionScope.transaction().executeInTransactionThread( |
| 22 | [view, animator, self = strongSmallRef(this), viewNode = strongSmallRef(&viewNode), value, name]() { |
| 23 | auto result = self->onViewApply(view, name, value, animator); |
| 24 | if (!result) { |
| 25 | viewNode->notifyAttributeFailed(viewNode->getAttributeIds().getIdForName(name), result.error()); |
| 26 | } |
| 27 | }); |
| 28 | |
| 29 | return Void(); |
| 30 | } |
| 31 | |
| 32 | void ViewAttributeHandlerDelegate::onReset(ViewTransactionScope& viewTransactionScope, |
| 33 | ViewNode& viewNode, |
nothing calls this directly
no test coverage detected