Don't ignore the decision for low skin display

The decision made in the settings, that low skin should be displayed, should be respected - and not overwritten by display properties.
This commit is contained in:
swissalpine 2020-11-29 15:31:45 +01:00 committed by GitHub
parent 3c173294f8
commit a9bcb0ee76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,15 +17,15 @@ class SkinLowRes @Inject constructor(private val config: Config) : SkinInterface
override fun overviewLayout(isLandscape: Boolean, isTablet: Boolean, isSmallHeight: Boolean): Int =
when {
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
}
override fun actionsLayout(isLandscape: Boolean, isSmallWidth: Boolean): Int =
when {
isLandscape || !isSmallWidth -> R.layout.actions_fragment
isLandscape -> R.layout.actions_fragment
else -> R.layout.actions_fragment_lowres
}
override fun preProcessLandscapeOverviewLayout(dm: DisplayMetrics, view: View, isTablet: Boolean) {}
}
}