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 22, 2024
1 parent 27045ee commit c36cfc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class OrientationHandlerModule internal constructor(context: ReactApplicationCon
init {
orientationHandlerImpl = OrientationHandlerImpl(context)
}

@ReactMethod()
override fun getInterfaceOrientation(promise: Promise) {
promise.resolve(orientationHandlerImpl.getInterfaceOrientation().ordinal)
Expand All @@ -37,10 +38,10 @@ class OrientationHandlerModule internal constructor(context: ReactApplicationCon
orientationHandlerImpl.unlock()
}

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

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

companion object {
Expand Down
5 changes: 3 additions & 2 deletions android/src/oldarch/OrientationHandlerSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ abstract class OrientationHandlerSpec internal constructor(context: ReactApplica

abstract fun getInterfaceOrientation(promise: Promise)
abstract fun getDeviceOrientation(promise: Promise)
abstract fun lockTo(orientation: Int)

abstract fun lockTo(orientation: Double)
abstract fun unlock()
abstract fun addListener(eventName: String)
abstract fun removeListeners(count: Double)
}

0 comments on commit c36cfc3

Please sign in to comment.