Skip to content
Snippets Groups Projects
Commit 7c4c63dc authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Automatically open menu only at first launch

parent b54c0829
No related branches found
No related tags found
No related merge requests found
......@@ -133,8 +133,22 @@ public class MainActivity extends ContentActivity implements FilterQueryProvider
//Restore fragments stack
restoreFragmentsStack(savedInstanceState, fm);
mCurrentFragmentId = savedInstanceState.getInt("current", mSettings.getInt("fragment_id", R.id.nav_video));
} else
} else {
if (getIntent().getBooleanExtra(StartActivity.EXTRA_UPGRADE, false)) {
/*
* The sliding menu is automatically opened when the user closes
* the info dialog. If (for any reason) the dialog is not shown,
* open the menu after a short delay.
*/
mActivityHandler.postDelayed(new Runnable() {
@Override
public void run() {
mDrawerLayout.openDrawer(mNavigationView);
}
}, 500);
}
reloadPreferences();
}
/* Set up the action bar */
prepareActionBar();
......@@ -166,20 +180,6 @@ public class MainActivity extends ContentActivity implements FilterQueryProvider
// set a custom shadow that overlays the main content when the drawer opens
mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
if (getIntent().getBooleanExtra(StartActivity.EXTRA_UPGRADE, false)) {
/*
* The sliding menu is automatically opened when the user closes
* the info dialog. If (for any reason) the dialog is not shown,
* open the menu after a short delay.
*/
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
mDrawerLayout.openDrawer(mNavigationView);
}
}, 500);
}
/* Reload the latest preferences */
mScanNeeded = savedInstanceState == null && mSettings.getBoolean("auto_rescan", true);
mExtensionsManager = ExtensionsManager.getInstance();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment