| 1558 | const StringBox& viewClassName, |
| 1559 | PlatformType platformType) { |
| 1560 | auto currentPlatformType = _viewNodeTree->getViewManagerContext()->getViewManager().getPlatformType(); |
| 1561 | if (currentPlatformType != platformType) { |
| 1562 | // macOS and Linux fall through to iOS class names as the base fallback. |
| 1563 | // macosClass / linuxClass overwrite iosClass when explicitly set (bound later). |
| 1564 | bool isFallthrough = ((currentPlatformType == PlatformTypeMacOS || currentPlatformType == PlatformTypeLinux) && |
| 1565 | platformType == PlatformTypeIOS) || |
| 1566 | // Linux also accepts macosClass as a shared-desktop override. |
| 1567 | (currentPlatformType == PlatformTypeLinux && platformType == PlatformTypeMacOS); |
| 1568 | if (!isFallthrough) { |
| 1569 | return; |
| 1570 | } |
| 1571 | } |
| 1572 | |
| 1573 | if (viewClassName.isEmpty()) { |
| 1574 | setViewFactory(viewTransactionScope, nullptr); |
no test coverage detected