We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f8d298f + 07a0d12 commit 508ab76Copy full SHA for 508ab76
app/src/main/java/com/infomaniak/mail/ui/main/folder/TwoPaneFragment.kt
@@ -82,6 +82,7 @@ abstract class TwoPaneFragment : Fragment() {
82
override fun onConfigurationChanged(newConfig: Configuration) {
83
super.onConfigurationChanged(newConfig)
84
updateDrawerLockMode()
85
+ ensureThreadIsDisplayed(newConfig.orientation)
86
}
87
88
private fun setupSlidingPane() = with(slidingPaneLayout) {
@@ -192,4 +193,10 @@ abstract class TwoPaneFragment : Fragment() {
192
193
)
194
195
196
+
197
+ private fun ensureThreadIsDisplayed(orientation: Int) {
198
+ if (orientation == Configuration.ORIENTATION_PORTRAIT && twoPaneViewModel.isInThreadInPhoneMode(requireContext())) {
199
+ slidingPaneLayout.openPaneNoAnimation()
200
+ }
201
202
0 commit comments