| 1649 | if (static_cast<bool>(hasTransform)) { |
| 1650 | viewNode->setAttribute( |
| 1651 | viewTransactionScope, translationYId, attributeOwner, Valdi::Value(translationY), nullptr); |
| 1652 | viewNode->setAttribute(viewTransactionScope, scaleXId, attributeOwner, Valdi::Value(scale), nullptr); |
| 1653 | viewNode->setAttribute(viewTransactionScope, scaleYId, attributeOwner, Valdi::Value(scale), nullptr); |
| 1654 | } else { |
| 1655 | viewNode->setAttribute( |
| 1656 | viewTransactionScope, translationYId, attributeOwner, Valdi::Value::undefined(), nullptr); |
| 1657 | viewNode->setAttribute(viewTransactionScope, scaleXId, attributeOwner, Valdi::Value::undefined(), nullptr); |
| 1658 | viewNode->setAttribute(viewTransactionScope, scaleYId, attributeOwner, Valdi::Value::undefined(), nullptr); |
| 1659 | } |
| 1660 | |
| 1661 | viewNode->getAttributesApplier().flush(viewTransactionScope); |
| 1662 | viewTransactionScope.flushNow(/* sync */ true); |
| 1663 | }); |
| 1664 | } |
| 1665 | |
| 1666 | void ValdiAndroid::NativeBridge::notifyApplyAttributeFailed(fbjni::alias_ref<fbjni::JClass> clazz, // NOLINT |
| 1667 | jlong viewNodeHandle, |
| 1668 | jint attributeId, |
| 1669 | jstring errorMessage) { |
| 1670 | auto viewNode = getViewNode(viewNodeHandle); |
| 1671 | if (viewNode == nullptr) { |
| 1672 | return; |
| 1673 | } |
| 1674 | |
| 1675 | // Failures can be reported asynchronously (e.g. font load completions posted to the main |
| 1676 | // thread). By then the node may be detached and its tree/logger already destroyed, so |
nothing calls this directly
no test coverage detected