File tree 1 file changed +9
-0
lines changed
app/src/main/java/com/infomaniak/mail/ui/main/folder
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,13 @@ abstract class TwoPaneFragment : Fragment() {
82
82
override fun onConfigurationChanged (newConfig : Configuration ) {
83
83
super .onConfigurationChanged(newConfig)
84
84
updateDrawerLockMode()
85
+ ensureThreadIsDisplayed(newConfig.orientation)
85
86
}
86
87
87
88
private fun setupSlidingPane () = with (slidingPaneLayout) {
89
+
88
90
lockMode = SlidingPaneLayout .LOCK_MODE_LOCKED
91
+
89
92
addPanelSlideListener(object : SlidingPaneLayout .PanelSlideListener {
90
93
override fun onPanelOpened (panel : View ) = Unit
91
94
override fun onPanelClosed (panel : View ) = Unit
@@ -192,4 +195,10 @@ abstract class TwoPaneFragment : Fragment() {
192
195
)
193
196
}
194
197
}
198
+
199
+ private fun ensureThreadIsDisplayed (orientation : Int ) {
200
+ if (orientation == Configuration .ORIENTATION_PORTRAIT && twoPaneViewModel.isInThreadInPhoneMode(requireContext())) {
201
+ slidingPaneLayout.openPaneNoAnimation()
202
+ }
203
+ }
195
204
}
You can’t perform that action at this time.
0 commit comments