Skip to content

Commit

Permalink
feat(android): setup new arch compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
gladiuscode committed May 21, 2024
1 parent ff37c5f commit d896f98
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class OrientationHandlerModule internal constructor(context: ReactApplicationCon
init {
orientationHandlerImpl = OrientationHandlerImpl(context)
}

@ReactMethod()
override fun getInterfaceOrientation(promise: Promise) {
promise.resolve(orientationHandlerImpl.getInterfaceOrientation().ordinal)
Expand All @@ -29,8 +28,8 @@ class OrientationHandlerModule internal constructor(context: ReactApplicationCon
}

@ReactMethod()
override fun lockTo(orientation: Int) {
orientationHandlerImpl.lockTo(orientation)
override fun lockTo(orientation: Double) {
orientationHandlerImpl.lockTo(orientation.toInt())
}

@ReactMethod()
Expand All @@ -39,10 +38,10 @@ class OrientationHandlerModule internal constructor(context: ReactApplicationCon
}

@ReactMethod
fun addListener(eventName: String) {}
override fun addListener(eventName: String) {}

@ReactMethod
fun removeListeners(count: Int) {}
override fun removeListeners(count: Double) {}

companion object {
const val NAME = "OrientationHandler"
Expand Down

0 comments on commit d896f98

Please sign in to comment.