3
3
#import < RNLiveMarkdown/RuntimeDecorator.h>
4
4
5
5
#import < React/RCTBridge+Private.h>
6
-
7
- #ifdef RCT_NEW_ARCH_ENABLED
8
6
#import < React/RCTScheduler.h>
9
7
#import < React/RCTSurfacePresenter.h>
10
- #endif // RCT_NEW_ARCH_ENABLED
11
8
12
9
#import < jsi/jsi.h>
13
10
18
15
// I think this is the easiest way to access the UIManager, which we need to
19
16
// actually register the hook
20
17
21
- @implementation LiveMarkdownModule {
22
- #ifdef RCT_NEW_ARCH_ENABLED
23
- __weak RCTSurfacePresenter *surfacePresenter_;
24
- #endif // RCT_NEW_ARCH_ENABLED
25
- }
18
+ @implementation LiveMarkdownModule
26
19
27
20
RCT_EXPORT_MODULE ()
28
21
@@ -35,38 +28,6 @@ @implementation LiveMarkdownModule {
35
28
return @(1 );
36
29
}
37
30
38
- #ifdef RCT_NEW_ARCH_ENABLED
39
-
40
- - (void )handleJavaScriptDidLoadNotification : (NSNotification *)notification
41
- {
42
- surfacePresenter_ = self.bridge .surfacePresenter ;
43
- }
44
-
45
- - (void )setBridge : (RCTBridge *)bridge
46
- {
47
- [super setBridge: bridge];
48
-
49
- [[NSNotificationCenter defaultCenter ] addObserver: self
50
- selector: @selector (handleJavaScriptDidLoadNotification: )
51
- name: RCTJavaScriptDidLoadNotification
52
- object: nil ];
53
-
54
- // only within the first loading `self.bridge.surfacePresenter` exists
55
- // during the reload `self.bridge.surfacePresenter` is null
56
- if (self.bridge .surfacePresenter ) {
57
- surfacePresenter_ = self.bridge .surfacePresenter ;
58
- }
59
- }
60
-
61
- /*
62
- * Taken from RCTNativeAnimatedTurboModule:
63
- * This selector is invoked via BridgelessTurboModuleSetup.
64
- */
65
- - (void )setSurfacePresenter : (id <RCTSurfacePresenterStub>)surfacePresenter
66
- {
67
- surfacePresenter_ = surfacePresenter;
68
- }
69
-
70
31
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule :
71
32
(const facebook::react::ObjCTurboModule::InitParams &)params {
72
33
return std::make_shared<facebook::react::NativeLiveMarkdownModuleSpecJSI>(
@@ -78,6 +39,4 @@ - (void)invalidate {
78
39
[super invalidate ];
79
40
}
80
41
81
- #endif // RCT_NEW_ARCH_ENABLED
82
-
83
42
@end
0 commit comments