Skip to content

Commit

Permalink
skip unknown orientation to fix RedApparat#400
Browse files Browse the repository at this point in the history
  • Loading branch information
vlaushkin committed Jul 29, 2022
1 parent 82602da commit fa4d8f1
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 fa4d8f1

Please sign in to comment.