Commit 8e4bc1e 1 parent 9de8da3 commit 8e4bc1e Copy full SHA for 8e4bc1e
File tree 4 files changed +15
-6
lines changed
src/latest/java/com/shopify/reactnative/skia
4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ else()
220
220
endif ()
221
221
message ("-- TURBO : " ${TURBOMODULES_LIB} )
222
222
223
+ add_definitions (-DREACT_NATIVE_VERSION=${REACT_NATIVE_VERSION} )
224
+
223
225
# Link
224
226
target_link_libraries (
225
227
${PACKAGE_NAME}
Original file line number Diff line number Diff line change @@ -172,13 +172,15 @@ android {
172
172
]
173
173
}
174
174
175
- if (REACT_NATIVE_VERSION > = 74 ) {
175
+ if (REACT_NATIVE_VERSION = = 74 ) {
176
176
srcDirs + = [
177
177
" src/reactnative74/java"
178
178
]
179
179
} else {
180
+ // the name latest here might be confusing as it applies for versions
181
+ // below 74 as well
180
182
srcDirs + = [
181
- " src/reactnative69 /java"
183
+ " src/latest /java"
182
184
]
183
185
}
184
186
}
Original file line number Diff line number Diff line change @@ -20,12 +20,17 @@ class BridgelessJSCallInvoker : public facebook::react::CallInvoker {
20
20
facebook::react::RuntimeExecutor runtimeExecutor)
21
21
: runtimeExecutor_(std::move(runtimeExecutor)) {}
22
22
23
- void invokeAsync (std::function<void ()> &&func) noexcept override {
24
- runtimeExecutor_ (
25
- [func = std::move (func)](facebook::jsi::Runtime &runtime) { func (); });
23
+ void invokeAsync (facebook::react::CallFunc &&func) noexcept override {
24
+ runtimeExecutor_ ([func = std::move (func)](facebook::jsi::Runtime &runtime) {
25
+ #if REACT_NATIVE_VERSION >= 75
26
+ func (runtime);
27
+ #else
28
+ func ();
29
+ #endif
30
+ });
26
31
}
27
32
28
- void invokeSync (std::function< void ()> &&func) override {
33
+ void invokeSync (facebook::react::CallFunc &&func) override {
29
34
throw std::runtime_error (
30
35
" Synchronous native -> JS calls are currently not supported." );
31
36
}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments