Merge pull request #89 from swissalpine/patch-1

Don't ignore the decision for low skin display
This commit is contained in:
Milos Kozak 2020-11-29 18:12:08 +01:00 committed by GitHub
commit 13310bbe4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,13 +17,13 @@ class SkinLowRes @Inject constructor(private val config: Config) : SkinInterface
override fun overviewLayout(isLandscape: Boolean, isTablet: Boolean, isSmallHeight: Boolean): Int = override fun overviewLayout(isLandscape: Boolean, isTablet: Boolean, isSmallHeight: Boolean): Int =
when { when {
config.NSCLIENT -> R.layout.overview_fragment_nsclient config.NSCLIENT -> R.layout.overview_fragment_nsclient
isSmallHeight || isLandscape -> R.layout.overview_fragment_landscape isLandscape -> R.layout.overview_fragment_landscape
else -> R.layout.overview_fragment else -> R.layout.overview_fragment
} }
override fun actionsLayout(isLandscape: Boolean, isSmallWidth: Boolean): Int = override fun actionsLayout(isLandscape: Boolean, isSmallWidth: Boolean): Int =
when { when {
isLandscape || !isSmallWidth -> R.layout.actions_fragment isLandscape -> R.layout.actions_fragment
else -> R.layout.actions_fragment_lowres else -> R.layout.actions_fragment_lowres
} }