File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
src/latest/java/com/shopify/reactnative/skia Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ else()
220220endif ()
221221message ("-- TURBO : " ${TURBOMODULES_LIB} )
222222
223+ add_definitions (-DREACT_NATIVE_VERSION=${REACT_NATIVE_VERSION} )
224+
223225# Link
224226target_link_libraries (
225227 ${PACKAGE_NAME}
Original file line number Diff line number Diff line change @@ -172,13 +172,15 @@ android {
172172 ]
173173 }
174174
175- if (REACT_NATIVE_VERSION > = 74 ) {
175+ if (REACT_NATIVE_VERSION = = 74 ) {
176176 srcDirs + = [
177177 " src/reactnative74/java"
178178 ]
179179 } else {
180+ // the name latest here might be confusing as it applies for versions
181+ // below 74 as well
180182 srcDirs + = [
181- " src/reactnative69 /java"
183+ " src/latest /java"
182184 ]
183185 }
184186 }
Original file line number Diff line number Diff line change @@ -20,12 +20,17 @@ class BridgelessJSCallInvoker : public facebook::react::CallInvoker {
2020 facebook::react::RuntimeExecutor runtimeExecutor)
2121 : runtimeExecutor_(std::move(runtimeExecutor)) {}
2222
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+ });
2631 }
2732
28- void invokeSync (std::function< void ()> &&func) override {
33+ void invokeSync (facebook::react::CallFunc &&func) override {
2934 throw std::runtime_error (
3035 " Synchronous native -> JS calls are currently not supported." );
3136 }
File renamed without changes.
You canβt perform that action at this time.
0 commit comments