From 54489b91ab2bed7d12064ef0884e487ea547e4d6 Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Tue, 22 May 2018 01:19:35 -0700 Subject: [PATCH] Fabric: Implementation of ShimmeringView aka Reviewed By: shergin Differential Revision: D8016962 fbshipit-source-id: 5ec598e606f8e4bbf9e5c1db082d6a0b29bed3ee --- ReactCommon/fabric/uimanager/FabricUIManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ReactCommon/fabric/uimanager/FabricUIManager.cpp b/ReactCommon/fabric/uimanager/FabricUIManager.cpp index 8a9d6916b27..47629e4273a 100644 --- a/ReactCommon/fabric/uimanager/FabricUIManager.cpp +++ b/ReactCommon/fabric/uimanager/FabricUIManager.cpp @@ -48,7 +48,7 @@ static const std::string componentNameByReactViewName(std::string viewName) { std::string rctPrefix("RCT"); if (std::mismatch(rctPrefix.begin(), rctPrefix.end(), viewName.begin()).first == rctPrefix.end()) { // If `viewName` has "RCT" prefix, remove it. - viewName.erase(0, 3); + viewName.erase(0, rctPrefix.length()); } // Fabric uses slightly new names for Text components because of differences @@ -70,8 +70,7 @@ static const std::string componentNameByReactViewName(std::string viewName) { // Other temporary fallback until the native components are implemented. if ( - viewName == "ActivityIndicatorView" || - viewName == "ShimmeringView" + viewName == "ActivityIndicatorView" ) { return "View"; }