1
0
Fork 1

Improve setting to disable nav drawer

This commit is contained in:
Arne 2024-09-20 16:54:28 +02:00
parent 06f2a21462
commit ed8b8402e0

View file

@ -67,6 +67,7 @@ import androidx.appcompat.app.AlertDialog;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.databinding.DataBindingUtil;
import androidx.drawerlayout.widget.DrawerLayout;
import de.monocles.chat.DownloadDefaultStickers;
import de.monocles.chat.FinishOnboarding;
@ -208,7 +209,11 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
refreshForNewCaps = false;
newCapsJids.clear();
invalidateActionBarTitle();
if (binding.drawer != null && binding.drawer.getDrawerLayout() != null && !getBooleanPreference("show_nav_drawer", R.bool.show_nav_drawer)) {
binding.drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
} else if (binding.drawer != null && binding.drawer.getDrawerLayout() != null) {
binding.drawer.getDrawerLayout().setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
}
if (accountHeader == null) return;
accountHeader.apply(ah -> {