Skip to content

Commit

Permalink
Merge remote-tracking branch 'fork/@jpiasecki/new-arch-ios' into @jpi…
Browse files Browse the repository at this point in the history
…asecki/new-arch-ios
  • Loading branch information
j-piasecki committed Feb 27, 2024
2 parents 2a423ff + 3e6e257 commit e78ee4b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions ios/MarkdownCommitHook.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ using namespace facebook::react;
namespace livemarkdown {

struct MarkdownTextInputDecoratorPair {
std::shared_ptr<const TextInputShadowNode> textInput;
std::shared_ptr<const MarkdownTextInputDecoratorShadowNode> decorator;
const std::shared_ptr<const TextInputShadowNode> textInput;
const std::shared_ptr<const MarkdownTextInputDecoratorShadowNode> decorator;
};

class MarkdownCommitHook : public UIManagerCommitHook {
Expand All @@ -35,7 +35,7 @@ class MarkdownCommitHook : public UIManagerCommitHook {
noexcept override;

private:
std::shared_ptr<UIManager> uiManager_;
const std::shared_ptr<UIManager> uiManager_;
};

} // namespace reanimated
Expand Down
5 changes: 2 additions & 3 deletions ios/MarkdownCommitHook.mm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#ifdef RCT_NEW_ARCH_ENABLED

#include <react/renderer/core/ComponentDescriptor.h>
Expand Down Expand Up @@ -50,7 +49,7 @@
std::vector<MarkdownTextInputDecoratorPair> nodesToUpdate;
MarkdownShadowFamilyRegistry::runForEveryFamily([&rootNode, &nodesToUpdate](ShadowNodeFamily::Shared family) {
// get the path from the root to the node from the decorator family
auto ancestors = family->getAncestors(*rootNode);
const auto ancestors = family->getAncestors(*rootNode);

if (!ancestors.empty()) {
auto &parentNode = ancestors.back().first.get();
Expand All @@ -74,7 +73,7 @@
}
});

for (auto &nodes : nodesToUpdate) {
for (const auto &nodes : nodesToUpdate) {
const auto &textInputState = *std::static_pointer_cast<const ConcreteState<TextInputState>>(nodes.textInput->getState());
const auto &stateData = textInputState.getData();

Expand Down
2 changes: 0 additions & 2 deletions ios/MarkdownTextInputDecoratorState.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class JSI_EXPORT MarkdownTextInputDecoratorState final {
MarkdownTextInputDecoratorState(const ShadowNodeFamily::Shared textInputFamily_) : decoratorFamily(textInputFamily_) {};

const ShadowNodeFamily::Shared decoratorFamily;

#pragma mark - Getters
};

} // namespace react
Expand Down
3 changes: 0 additions & 3 deletions ios/MarkdownTextInputDecoratorView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ - (void)didMoveToWindow {
[_markdownUtils setMarkdownStyle:_markdownStyle];

[_textInput setMarkdownUtils:_markdownUtils];

// [_textInput performSelector:@selector(_updateState)];

if ([backedTextInputView isKindOfClass:[RCTUITextField class]]) {
RCTUITextField *textField = (RCTUITextField *)backedTextInputView;
_adapter = [textField valueForKey:@"textInputDelegateAdapter"];
Expand Down
2 changes: 1 addition & 1 deletion ios/RCTLiveMarkdownModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ @implementation RCTLiveMarkdownModule {

RCT_EXPORT_MODULE(@"LiveMarkdownModule")

- (NSNumber*)install
- (NSNumber *)install
{
if (!installed_) {
installed_ = YES;
Expand Down

0 comments on commit e78ee4b

Please sign in to comment.