From a9ad589a950aeecfba6db7ea2a14deaffd534760 Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Sun, 26 Aug 2018 01:24:29 +0200 Subject: [PATCH] Don't lock the drawer (#37) If you start syncthing and run conditions do not apply, the drawer is locked. You can then only change settings, press the back or home button to leave the app running but exiting the app is not possible. --- .../com/nutomic/syncthingandroid/activities/MainActivity.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java index 154861e0..bbf6fca6 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java @@ -112,8 +112,6 @@ public class MainActivity extends SyncthingActivity case STARTING: break; case ACTIVE: - mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED); - // Check if the usage reporting minimum delay passed by. Boolean usageReportingDelayPassed = (new Date().getTime() > getFirstStartTime() + USAGE_REPORTING_DIALOG_DELAY); RestApi restApi = getApi(); @@ -192,7 +190,7 @@ public class MainActivity extends SyncthingActivity fm.beginTransaction().replace(R.id.drawer, mDrawerFragment).commit(); mDrawerToggle = new Toggle(this, mDrawerLayout); - mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); + mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED); mDrawerLayout.addDrawerListener(mDrawerToggle); setOptimalDrawerWidth(findViewById(R.id.drawer));