Default session orientation to landscape (#1287)

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-21 21:27:25 -04:00
1 parent 2b0c55f72e
commit 1251e9d3ee
4 files changed
+6 -6

No files matched your search

@@ -51,9 +51,9 @@ object SessionPrefs {
)
fun orientation(context: Context): Int =
prefs(context).getInt("orientation", ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)
prefs(context).getInt("orientation", ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
.takeIf { value -> orientationOptions.any { it.first == value } }
?: ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
?: ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
fun setOrientation(context: Context, orientation: Int) {
require(orientationOptions.any { it.first == orientation })