1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-09 03:31:46 +00:00

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.
This commit is contained in:
Catfriend1 2018-08-26 01:24:29 +02:00 committed by GitHub
parent 49dc1d80af
commit a9ad589a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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));