Skip to content

Commit ce3adc6

Browse files
authored
Merge pull request #34 from Louis-C7/sig
refactor: remove code specific to ArkTS architecture and improve names
2 parents c0b6627 + bc454fb commit ce3adc6

19 files changed

+336
-632
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
export * from "./ts"
2-
export * from "./src/main/ets/rnoh/RNGestureHandlerRootView"
3-
export * from "./src/main/ets/rnoh/RNGestureHandlerButton"
42
export { default } from "./src/main/ets/RNOHPackage"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { RNPackage, RNPackageContext } from "@rnoh/react-native-openharmony";
2-
import type { UITurboModule, UITurboModuleContext } from "@rnoh/react-native-openharmony/ts";
2+
import type { TurboModule, TurboModuleContext } from "@rnoh/react-native-openharmony/ts";
33
import { RNGestureHandlerModule } from './rnoh/RNGestureHandlerModule';
44

55
export default class RnohReactNativeHarmonyGestureHandlerPackage extends RNPackage {
@@ -10,8 +10,8 @@ export default class RnohReactNativeHarmonyGestureHandlerPackage extends RNPacka
1010
this.isRNGHDevModeEnabled = isRNGHDevModeEnabled
1111
}
1212

13-
getUITurboModuleFactoryByNameMap(): Map<string, (ctx: UITurboModuleContext) => UITurboModule | null> {
13+
getUITurboModuleFactoryByNameMap(): Map<string, (ctx: TurboModuleContext) => TurboModule | null> {
1414
return new Map().set(RNGestureHandlerModule.NAME,
15-
(ctx: UITurboModuleContext) => new RNGestureHandlerModule(ctx, this.isRNGHDevModeEnabled))
15+
(ctx: TurboModuleContext) => new RNGestureHandlerModule(ctx, this.isRNGHDevModeEnabled))
1616
}
1717
}

tester/harmony/gesture_handler/src/main/ets/core/ViewFinder.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

tester/harmony/gesture_handler/src/main/ets/core/ViewRegistry.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Tag, View } from "./View"
2-
import { ViewFinder } from "./ViewFinder"
32

4-
export interface ViewRegistry extends ViewFinder {
3+
export interface ViewRegistry {
54
getViewByTag(viewTag: Tag): View | undefined
65
save(view: View): void
76
deleteByTag(viewTag: Tag): void

tester/harmony/gesture_handler/src/main/ets/core/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ export * from "./PointerTracker"
1111
export * from "./RNGHError"
1212
export * from "./State"
1313
export * from "./GestureHandlerRegistry"
14-
export * from "./ViewFinder"
1514
export * from "./ViewRegistry"
1615
export * from './Multiset'

tester/harmony/gesture_handler/src/main/ets/rnoh/GestureHandlerPackage.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import {RNPackage, UITurboModuleFactory} from "@rnoh/react-native-openharmony/ts";
2-
import type {UITurboModule, UITurboModuleContext} from "@rnoh/react-native-openharmony/ts";
1+
import {RNPackage, TurboModulesFactory} from "@rnoh/react-native-openharmony/ts";
2+
import type {TurboModule, TurboModuleContext} from "@rnoh/react-native-openharmony/ts";
33
import {RNGestureHandlerModule} from './RNGestureHandlerModule';
44

5-
class GestureHandlerTurboModuleFactory extends UITurboModuleFactory {
6-
createTurboModule(name: string): UITurboModule | null {
5+
class GestureHandlerTurboModuleFactory extends TurboModulesFactory {
6+
createTurboModule(name: string): TurboModule | null {
77
if (name === RNGestureHandlerModule.NAME) {
88
return new RNGestureHandlerModule(this.ctx);
99
}
@@ -19,7 +19,7 @@ class GestureHandlerTurboModuleFactory extends UITurboModuleFactory {
1919
* @deprecated: Use the package class exported from ../RNOHPackage.ets (2024-10-10)
2020
*/
2121
export class GestureHandlerPackage extends RNPackage {
22-
createUITurboModuleFactory(ctx: UITurboModuleContext): UITurboModuleFactory {
22+
createUITurboModuleFactory(ctx: TurboModuleContext): TurboModulesFactory {
2323
return new GestureHandlerTurboModuleFactory(ctx);
2424
}
2525
}

tester/harmony/gesture_handler/src/main/ets/rnoh/RNGHRootTouchHandlerArkTS.ts

Lines changed: 0 additions & 98 deletions
This file was deleted.

tester/harmony/gesture_handler/src/main/ets/rnoh/RNGHRootTouchHandlerCAPI.ts

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)