Skip to content

Commit a44088f

Browse files
committed
修改OH_ArkUI_QueryModuleInterfaceByName
1 parent 8ec3766 commit a44088f

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

harmony/smart_refresh_layout.har

18 Bytes
Binary file not shown.

harmony/smart_refresh_layout/oh-package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"name": "@react-native-oh-tpl/react-native-smartrefreshlayout",
77
"description": "Please describe the basic information.",
88
"main": "index.ets",
9-
"version": "0.6.7-0.2.5",
9+
"version": "0.6.7-0.2.6",
1010
"dependencies": {
1111
"@rnoh/react-native-openharmony": "file:../react_native_openharmony"
1212
},

harmony/smart_refresh_layout/src/main/cpp/SmartRefreshLayoutComponentInstance.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ namespace rnoh {
5555
PullToRefreshNode &SmartRefreshLayoutComponentInstance::getLocalRootArkUINode() { return m_pullToRefreshNode; }
5656

5757
void SmartRefreshLayoutComponentInstance::panGesture(ArkUI_NodeHandle arkUI_NodeHandle) {
58-
auto gestureApi = reinterpret_cast<ArkUI_NativeGestureAPI_1 *>(OH_ArkUI_GetNativeAPI(ARKUI_NATIVE_GESTURE, 1));
58+
auto anyGestureApi = OH_ArkUI_QueryModuleInterfaceByName(ARKUI_NATIVE_GESTURE, "ArkUI_NativeGestureAPI_1");
59+
auto gestureApi = reinterpret_cast<ArkUI_NativeGestureAPI_1 *>(anyGestureApi);
5960
auto panGesture = gestureApi->createPanGesture(1, GESTURE_DIRECTION_VERTICAL, 5);
6061
auto onPanActionCallBack = [](ArkUI_GestureEvent *event, void *extraParam) {
6162
SmartRefreshLayoutComponentInstance *instance = (SmartRefreshLayoutComponentInstance *)extraParam;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native-oh-tpl/react-native-smartrefreshlayout",
3-
"version": "0.6.7-0.2.5",
3+
"version": "0.6.7-0.2.6",
44
"description": "基于android SmartRefreshLayout的封装",
55
"harmony": {
66
"alias": "react-native-smartrefreshlayout"

0 commit comments

Comments
 (0)