Merge pull request #5207 from k9mail/drawer_in_search

Lock DrawerLayout closed when drawer is disabled
This commit is contained in:
cketti 2021-03-22 16:23:17 +01:00 committed by GitHub
commit 4d9035854e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,7 @@ import android.widget.Toast
import androidx.appcompat.app.ActionBar
import androidx.appcompat.app.ActionBarDrawerToggle
import androidx.appcompat.widget.Toolbar
import androidx.drawerlayout.widget.DrawerLayout
import androidx.drawerlayout.widget.DrawerLayout.DrawerListener
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
@ -522,6 +523,8 @@ open class MessageList :
private fun initializeDrawer(savedInstanceState: Bundle?) {
if (!isDrawerEnabled) {
val drawerLayout = findViewById<DrawerLayout>(R.id.drawerLayout)
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED)
return
}