mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Pass layoutDirection to surface handler
Summary: Changelog: [internal] During transition to SurfaceHandler, layoutDirection got lost. This diff adds it back. Reviewed By: JoshuaGross Differential Revision: D26775873 fbshipit-source-id: 9b638b4c2a41eb887312b968a2e113c5fcd7463d
This commit is contained in:
1 parent
305b4253c2
commit
542c7cc357
2 files changed
+5
No files matched your search
@@ -168,6 +168,8 @@ using namespace facebook::react;
|
||||
- (void)_updateLayoutContext
|
||||
{
|
||||
auto layoutConstraints = _surfaceHandler->getLayoutConstraints();
|
||||
layoutConstraints.layoutDirection = RCTLayoutDirection([[RCTI18nUtil sharedInstance] isRTL]);
|
||||
|
||||
auto layoutContext = _surfaceHandler->getLayoutContext();
|
||||
|
||||
layoutContext.pointScaleFactor = RCTScreenScale();
|
||||
|
||||
@@ -58,6 +58,9 @@ void SurfaceHandler::start() const noexcept {
|
||||
std::unique_lock<better::shared_mutex> lock(linkMutex_);
|
||||
react_native_assert(
|
||||
link_.status == Status::Registered && "Surface must be registered.");
|
||||
react_native_assert(
|
||||
getLayoutConstraints().layoutDirection != LayoutDirection::Undefined &&
|
||||
"layoutDirection must be set.");
|
||||
|
||||
auto parameters = Parameters{};
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user