Files
react-native/ReactCommon/fabric/components/text/paragraph/conversions.h
T
Valentin SherginandFacebook Github Bot 2332cb6fe2 Fabric: A bunch of #ifdef ANDROID
Summary: Nothing really changed; the change is only to better express an original intent.

Reviewed By: JoshuaGross

Differential Revision: D13962464

fbshipit-source-id: f385db8ba8662f2150181e47fc6a2a981f809e96
2019-02-06 16:34:46 -08:00

27 lines
748 B
C++

// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#include <folly/dynamic.h>
#include <react/attributedstring/conversions.h>
#include <react/components/text/ParagraphLocalData.h>
namespace facebook {
namespace react {
#ifdef ANDROID
inline folly::dynamic toDynamic(const ParagraphLocalData &paragraphLocalData) {
folly::dynamic newLocalData = folly::dynamic::object();
newLocalData["attributedString"] =
toDynamic(paragraphLocalData.getAttributedString());
newLocalData["hash"] = newLocalData["attributedString"]["hash"];
return newLocalData;
}
#endif
} // namespace react
} // namespace facebook