Skip to content

Commit

Permalink
fix skip unknown orientation to fix RedApparat#400
Browse files Browse the repository at this point in the history
  • Loading branch information
vlaushkin committed Jul 30, 2022
1 parent 9454f3e commit adf5876
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal open class RotationListener(
lateinit var orientationChanged: (DeviceRotationDegrees) -> Unit

override fun onOrientationChanged(orientation: DeviceRotationDegrees) {
if (canDetectOrientation()) {
if (canDetectOrientation() && orientation != ORIENTATION_UNKNOWN) {
orientationChanged(orientation)
}
}
Expand Down

0 comments on commit adf5876

Please sign in to comment.