mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 07:46:01 +00:00
fix(session): let the portrait custom resolution dialog accept tall sizes
This commit is contained in:
4 files changed
+13
-4
No files matched your search
@@ -1313,7 +1313,7 @@ object SessionPrefs {
|
||||
return parseOrientedResolution(value)?.let { "${it.first}x${it.second}" } ?: SessionDisplay.LINK_LANDSCAPE
|
||||
}
|
||||
|
||||
private fun parseOrientedResolution(text: String): Pair<Int, Int>? =
|
||||
fun parseOrientedResolution(text: String): Pair<Int, Int>? =
|
||||
parseResolution(text) ?: text.trim().split('x', 'X', '×', '*').takeIf { it.size == 2 }
|
||||
?.let { parseResolution("${it[1]}x${it[0]}") }?.let { it.second to it.first }
|
||||
|
||||
|
||||
Reference in new issue
Block a user